Skip to content

Commit 0d51bc6

Browse files
Hernan Federico MoralesHernan Federico Morales
authored andcommitted
Release v0.8.3
1 parent bd373e0 commit 0d51bc6

File tree

9 files changed

+41
-76
lines changed

9 files changed

+41
-76
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@ All notable changes to this project will be documented in this file. Dates are d
44

55
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
66

7+
#### [0.8.3](https://github.com/hernanmd/pi/compare/0.8.2...0.8.3)
8+
79
#### [0.8.2](https://github.com/hernanmd/pi/compare/0.8.1...0.8.2)
810

11+
> 18 April 2025
12+
13+
- Release v0.8.2 [`bd373e0`](https://github.com/hernanmd/pi/commit/bd373e057bbc8bd847319120ddc02c85fe78c0c3)
14+
915
#### [0.8.1](https://github.com/hernanmd/pi/compare/0.8.0...0.8.1)
1016

1117
> 14 July 2023

DATE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18-04-2025
1+
02-07-2025

README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,6 @@ Installing a stable Pharo image in the current directory:
104104
pi image
105105
```
106106

107-
Install and run the latest Pharo image in a new timestamped directory:
108-
```bash
109-
pi nlrun
110-
```
111-
112107
Installing NeoCSV package:
113108
```bash
114109
pi install NeoCSV

libexec/piEnvVars.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ set_zconf_url
2626
pkgVersion="stable"
2727
# Detected Operating System
2828
os="Unknown"
29+
# Default Pharo version to request if no version is provided
30+
pharoRequestedVersion="13"
2931

3032
#################################
3133
## GitHub Settings

libexec/piHelp.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,8 @@ The options include:
3737
install <pkgname> Install pkgname to the Image found in the current directory. Download image if not found.
3838
list List Pharo packages found in GitHub.
3939
run Run a Pharo Image.
40-
irun Download the stable image and run Pharo.image.
41-
lrun Download the latest image and run Pharo.image.
42-
nrun Download the stable image in a new timestamped directory and run Pharo.image.
43-
nlrun Download the latest image in a new timestamped directory and run Pharo.image.
40+
irun Download and run Pharo.image.
41+
nrun Download in a new timestamped directory and run Pharo.image.
4442
trun Trash pharo-local and run Pharo.image.
4543
search <pkgname> Search for pkgname in GitHub.
4644
update Update package directory.

libexec/piInstallPkg.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ install_from_github () {
2020

2121
# Read argument packages and install from their repositories
2222
install_packages () {
23+
if [ $# -eq 0 ]; then
24+
pi_log "Please specify at least one package to install\n"
25+
printf "exit with error\n"
26+
return 1
27+
fi
2328
printf "Installing packages...\n"
2429
until [ -z "$1" ]; do
2530
install_from_github "$1"

libexec/piParseCmdOptions.sh

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ parse_cmd_line () {
2121
examples && exit 0
2222
;;
2323
image | IMAGE )
24-
install_pharo
24+
install_pharo "${@:2}"
2525
;;
2626
init | INIT)
2727
init_db
@@ -36,19 +36,13 @@ parse_cmd_line () {
3636
run_pharo
3737
;;
3838
irun | IRUN )
39-
irun_pharo
40-
;;
41-
lrun | LRUN )
42-
lrun_pharo
39+
irun_pharo "${@:2}"
4340
;;
4441
trun | TRUN )
4542
trun_pharo
4643
;;
4744
nrun | NRUN )
48-
nrun_pharo
49-
;;
50-
nlrun | NLRUN )
51-
nlrun_pharo
45+
nrun_pharo "${@:2}"
5246
;;
5347
search )
5448
search_packages "${@:2}"

libexec/piPharo.sh

Lines changed: 21 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#
55

66
source "${BASH_SOURCE%/*}"/piUtils.sh
7-
pharoLatest="130+vm"
87

98
find_os_id () {
109
# Find our distribution or OS
@@ -56,14 +55,6 @@ apt_install () {
5655
sudo apt-get install libc6:i386 libssl1.0.0:i386 libfreetype6:i386
5756
}
5857

59-
# For ElementaryOS
60-
# This function is currently not used
61-
ppa_install () {
62-
add-apt-repository ppa:pharo/stable
63-
apt-get update
64-
apt-get install pharo-vm-desktop
65-
}
66-
6758
# For CentOS/RedHat
6859
# This function is currently not used
6960
yum_install () {
@@ -86,10 +77,10 @@ linstall_pharo () {
8677
case "$os" in
8778
"arm64")
8879
zeroConfUrl="http://files.pharo.org/vm/pharo-spur64-headless/Darwin-arm64/latest.zip"
89-
download_pharo_m1_latest
80+
download_pharo_arm64
9081
;;
9182
* )
92-
download_pharo_latest
83+
download_pharo_x86_64
9384
;;
9485
esac
9586
}
@@ -100,16 +91,13 @@ install_pharo () {
10091
case "$os" in
10192
"arm64")
10293
zeroConfUrl="http://files.pharo.org/vm/pharo-spur64-headless/Darwin-arm64/latest.zip"
103-
download_pharo_m1
94+
download_pharo_arm64 $1
10495
;;
10596
"CentOS*" | "RedHat*" )
10697
yum_install
10798
;;
108-
"Ubuntu*")
109-
ppa_install
110-
;;
11199
* )
112-
download_pharo
100+
download_pharo_x86_64 $1
113101
;;
114102
esac
115103
}
@@ -137,13 +125,7 @@ run_pharo () {
137125

138126
# Install a stable image and run Pharo
139127
irun_pharo () {
140-
install_pharo
141-
run_pharo
142-
}
143-
144-
# Install latest Pharo and run Pharo.image
145-
lrun_pharo () {
146-
linstall_pharo
128+
install_pharo $1
147129
run_pharo
148130
}
149131

@@ -157,53 +139,36 @@ trun_pharo () {
157139

158140
# Trash pharo-local (requires trash utility) and run Pharo.image
159141
nrun_pharo () {
160-
dirname=$(date +%Y-%m-%d-%S)
161-
(mkdir -v "$dirname" && cd "$dirname" && irun_pharo) || pi_log "Cannot run Pharo Image"
142+
if [ ! $# -eq 0 ]; then
143+
pharoRequestedVersion=$1
144+
fi
145+
dirname="pharo-$pharoRequestedVersion-$(date +%Y-%m-%d-%S)"
146+
(mkdir -v "$dirname" && cd "$dirname" && irun_pharo $1) || pi_log "Cannot run Pharo Image"
162147
}
163148

164-
# Install latest Pharo in a new timestamed directory and run Pharo.image
165-
nlrun_pharo () {
166-
dirname=$(date +%Y-%m-%d-%S)
167-
(mkdir -v "$dirname" && cd "$dirname" && lrun_pharo) || pi_log "Cannot run Pharo Image"
168-
}
169-
170-
download_pharo () {
149+
download_pharo_x86_64 () {
171150
pi_log "Checking Pharo installation in the current directory...\n"
172151
if ! is_pharo_installed; then
152+
if [ ! $# -eq 0 ]; then
153+
pharoRequestedVersion=$1
154+
fi
155+
# Convert to Zeroconf version, i.e. Requesting 13 -> 130
156+
urlVersion="${pharoRequestedVersion}0+vm"
173157
pi_log "Downloading Pharo...\n"
174-
exec $dApp $dPharoParams $zeroConfUrl | bash
158+
exec $dApp $dPharoParams $zeroConfUrl/$urlVersion | bash
175159
fi
176160
[[ ! is_pharo_installed ]] && { pi_err "Could not download Pharo, exiting\n"; exit 1; }
177161
}
178162

179-
download_pharo_latest () {
180-
pi_log "Checking latest Pharo installation in the current directory...\n"
181-
if ! is_pharo_installed; then
182-
pi_log "Downloading latest Pharo...\n"
183-
exec $dApp $dPharoParams $zeroConfUrl/$pharoLatest | bash
184-
fi
185-
[[ ! is_pharo_installed ]] && { pi_err "Could not download latest Pharo, exiting\n"; exit 1; }
186-
}
187-
188-
download_pharo_m1 () {
163+
download_pharo_arm64 () {
189164
pi_log "Checking Pharo installation in the current directory...\n"
190165
if ! is_pharo_installed; then
166+
# Convert to Zeroconf version, i.e. Requesting 13 -> 130
167+
urlVersion="${pharoRequestedVersion}0"
191168
pi_log "Downloading Pharo...\n"
192169
exec $dApp $zeroConfUrl
193170
unzip latest.zip
194-
exec $dApp $dPharoParams get.pharo.org/64 | bash -
195-
fi
196-
[[ ! is_pharo_installed ]] && { pi_err "Could not download Pharo, exiting\n"; exit 1; }
197-
}
198-
199-
# Latest version of Pharo for ZeroConf download
200-
download_pharo_m1_latest () {
201-
pi_log "Checking latest Pharo installation in the current directory...\n"
202-
if ! is_pharo_installed; then
203-
pi_log "Downloading latest Pharo...\n"
204-
exec $dApp $zeroConfUrl
205-
unzip latest.zip
206-
exec $dApp $dPharoParams get.pharo.org/64/$pharoLatest | bash -
171+
exec $dApp $dPharoParams get.pharo.org/64/$urlVersion | bash -
207172
fi
208173
[[ ! is_pharo_installed ]] && { pi_err "Could not download latest Pharo, exiting\n"; exit 1; }
209174
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pi",
3-
"version": "0.8.2",
3+
"version": "0.8.3",
44
"description": "",
55
"main": "index.js",
66
"type": "module",

0 commit comments

Comments
 (0)