Skip to content

Commit 6501bfd

Browse files
author
Hernán Morales Durand
committed
Release v0.7.0
1 parent f58b42c commit 6501bfd

File tree

6 files changed

+101
-4
lines changed

6 files changed

+101
-4
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,18 @@ 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.7.0](https://github.com/hernanmd/pi/compare/0.6.2...0.7.0)
8+
9+
- Update README.md [`7a178bf`](https://github.com/hernanmd/pi/commit/7a178bf800b702077c4ccbc8f3fd6763e149f828)
10+
- Add docs directory [`f58b42c`](https://github.com/hernanmd/pi/commit/f58b42ce338127525107cde377a161a713d55939)
11+
712
#### [0.6.2](https://github.com/hernanmd/pi/compare/0.6.1...0.6.2)
813

14+
> 14 June 2022
15+
16+
- Release v0.6.2 [`6964b46`](https://github.com/hernanmd/pi/commit/6964b461b426f07f0e9dd8f016a00b68549927f4)
917
- Update README.md [`4beccfb`](https://github.com/hernanmd/pi/commit/4beccfb2dfd1666b0f4b259719864cc9166f6a13)
1018
- Add demo session [`b59547c`](https://github.com/hernanmd/pi/commit/b59547c36c54c8b5f63ad17399881ff4aded4430)
11-
- Update README.md [`997d809`](https://github.com/hernanmd/pi/commit/997d8094e553fda959e6eab24d7c854c75eb688a)
1219

1320
#### [0.6.1](https://github.com/hernanmd/pi/compare/0.6.0...0.6.1)
1421

DATE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
14-06-2022
1+
26-12-2022

libexec/piHelp.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@ The options include:
3636
init Initialize and fetch PI Pharo package cache
3737
install <pkgname> Install pkgname to the Image found in the current directory.\n\t\tDownload image if not found.
3838
list List Pharo packages found in GitHub.
39-
run Run a Pharo Image.
39+
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.
44+
trun Trash pharo-local and run Pharo.image.
4045
search <pkgname> Search for pkgname in GitHub.
4146
update Update package directory.
4247
version Show program version.

libexec/piParseCmdOptions.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,21 @@ parse_cmd_line () {
3535
run | RUN )
3636
run_pharo
3737
;;
38+
irun | IRUN )
39+
irun_pharo
40+
;;
41+
lrun | LRUN )
42+
lrun_pharo
43+
;;
44+
trun | TRUN )
45+
trun_pharo
46+
;;
47+
nrun | NRUN )
48+
nrun_pharo
49+
;;
50+
nlrun | NLRUN )
51+
nlrun_pharo
52+
;;
3853
search )
3954
search_packages "${@:2}"
4055
;;

libexec/piPharo.sh

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

66
source "${BASH_SOURCE%/*}"/piUtils.sh
7+
pharoLatest="110+vm"
78

89
find_os_id () {
910
# Find our distribution or OS
@@ -79,6 +80,20 @@ yum_install () {
7980
libSM.i686
8081
}
8182

83+
# Install latest version of Pharo
84+
linstall_pharo () {
85+
find_os_id
86+
case "$os" in
87+
"arm64")
88+
zeroConfUrl="http://files.pharo.org/vm/pharo-spur64-headless/Darwin-arm64/latest.zip"
89+
download_pharo_m1_latest
90+
;;
91+
* )
92+
download_pharo_latest
93+
;;
94+
esac
95+
}
96+
8297
# Prefer provider packages if distribution was found
8398
install_pharo () {
8499
find_os_id
@@ -120,6 +135,40 @@ run_pharo () {
120135
fi
121136
}
122137

138+
# Install a stable image and run Pharo
139+
irun_pharo () {
140+
install_pharo
141+
run_pharo
142+
}
143+
144+
# Install latest Pharo and run Pharo.image
145+
lrun_pharo () {
146+
linstall_pharo
147+
run_pharo
148+
}
149+
150+
# Trash pharo-local (requires trash utility) and run Pharo.image
151+
trun_pharo () {
152+
if [[ -d "pharo-local" ]]; then
153+
trash pharo-local
154+
fi
155+
run_pharo
156+
}
157+
158+
# Trash pharo-local (requires trash utility) and run Pharo.image
159+
nrun_pharo () {
160+
dirname=$(date +%Y-%m-%d-%S)
161+
mkdir -v "$dirname"; cd "$dirname"
162+
irun_pharo
163+
}
164+
165+
# Install latest Pharo in a new timestamed directory and run Pharo.image
166+
nlrun_pharo () {
167+
dirname=$(date +%Y-%m-%d-%S)
168+
mkdir -v "$dirname"; cd "$dirname"
169+
lrun_pharo
170+
}
171+
123172
download_pharo () {
124173
pi_log "Checking Pharo installation in the current directory...\n"
125174
if ! is_pharo_installed; then
@@ -129,6 +178,15 @@ download_pharo () {
129178
[[ ! is_pharo_installed ]] && { pi_err "Could not download Pharo, exiting\n"; exit 1; }
130179
}
131180

181+
download_pharo_latest () {
182+
pi_log "Checking latest Pharo installation in the current directory...\n"
183+
if ! is_pharo_installed; then
184+
pi_log "Downloading latest Pharo...\n"
185+
exec $dApp $dPharoParams $zeroConfUrl/$pharoLatest | bash
186+
fi
187+
[[ ! is_pharo_installed ]] && { pi_err "Could not download latest Pharo, exiting\n"; exit 1; }
188+
}
189+
132190
download_pharo_m1 () {
133191
pi_log "Checking Pharo installation in the current directory...\n"
134192
if ! is_pharo_installed; then
@@ -138,4 +196,16 @@ download_pharo_m1 () {
138196
exec $dApp $dPharoParams get.pharo.org/64 | bash -
139197
fi
140198
[[ ! is_pharo_installed ]] && { pi_err "Could not download Pharo, exiting\n"; exit 1; }
199+
}
200+
201+
# Latest version of Pharo for ZeroConf download
202+
download_pharo_m1_latest () {
203+
pi_log "Checking latest Pharo installation in the current directory...\n"
204+
if ! is_pharo_installed; then
205+
pi_log "Downloading latest Pharo...\n"
206+
exec $dApp $zeroConfUrl
207+
unzip latest.zip
208+
exec $dApp $dPharoParams get.pharo.org/64/$pharoLatest | bash -
209+
fi
210+
[[ ! is_pharo_installed ]] && { pi_err "Could not download latest Pharo, exiting\n"; exit 1; }
141211
}

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.6.2",
3+
"version": "0.7.0",
44
"description": "",
55
"main": "index.js",
66
"type": "module",

0 commit comments

Comments
 (0)