Skip to content

Commit

Permalink
Release v0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Hernán Morales Durand committed Dec 26, 2022
1 parent f58b42c commit 6501bfd
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 4 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,18 @@ All notable changes to this project will be documented in this file. Dates are d

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

#### [0.7.0](https://github.com/hernanmd/pi/compare/0.6.2...0.7.0)

- Update README.md [`7a178bf`](https://github.com/hernanmd/pi/commit/7a178bf800b702077c4ccbc8f3fd6763e149f828)
- Add docs directory [`f58b42c`](https://github.com/hernanmd/pi/commit/f58b42ce338127525107cde377a161a713d55939)

#### [0.6.2](https://github.com/hernanmd/pi/compare/0.6.1...0.6.2)

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

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

Expand Down
2 changes: 1 addition & 1 deletion DATE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14-06-2022
26-12-2022
7 changes: 6 additions & 1 deletion libexec/piHelp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ The options include:
init Initialize and fetch PI Pharo package cache
install <pkgname> Install pkgname to the Image found in the current directory.\n\t\tDownload image if not found.
list List Pharo packages found in GitHub.
run Run a Pharo Image.
run Run a Pharo Image.
irun Download the stable image and run Pharo.image.
lrun Download the latest image and run Pharo.image.
nrun Download the stable image in a new timestamped directory and run Pharo.image.
nlrun Download the latest image in a new timestamped directory and run Pharo.image.
trun Trash pharo-local and run Pharo.image.
search <pkgname> Search for pkgname in GitHub.
update Update package directory.
version Show program version.
Expand Down
15 changes: 15 additions & 0 deletions libexec/piParseCmdOptions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,21 @@ parse_cmd_line () {
run | RUN )
run_pharo
;;
irun | IRUN )
irun_pharo
;;
lrun | LRUN )
lrun_pharo
;;
trun | TRUN )
trun_pharo
;;
nrun | NRUN )
nrun_pharo
;;
nlrun | NLRUN )
nlrun_pharo
;;
search )
search_packages "${@:2}"
;;
Expand Down
70 changes: 70 additions & 0 deletions libexec/piPharo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#

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

find_os_id () {
# Find our distribution or OS
Expand Down Expand Up @@ -79,6 +80,20 @@ yum_install () {
libSM.i686
}

# Install latest version of Pharo
linstall_pharo () {
find_os_id
case "$os" in
"arm64")
zeroConfUrl="http://files.pharo.org/vm/pharo-spur64-headless/Darwin-arm64/latest.zip"
download_pharo_m1_latest
;;
* )
download_pharo_latest
;;
esac
}

# Prefer provider packages if distribution was found
install_pharo () {
find_os_id
Expand Down Expand Up @@ -120,6 +135,40 @@ run_pharo () {
fi
}

# Install a stable image and run Pharo
irun_pharo () {
install_pharo
run_pharo
}

# Install latest Pharo and run Pharo.image
lrun_pharo () {
linstall_pharo
run_pharo
}

# Trash pharo-local (requires trash utility) and run Pharo.image
trun_pharo () {
if [[ -d "pharo-local" ]]; then
trash pharo-local
fi
run_pharo
}

# Trash pharo-local (requires trash utility) and run Pharo.image
nrun_pharo () {
dirname=$(date +%Y-%m-%d-%S)
mkdir -v "$dirname"; cd "$dirname"
irun_pharo
}

# Install latest Pharo in a new timestamed directory and run Pharo.image
nlrun_pharo () {
dirname=$(date +%Y-%m-%d-%S)
mkdir -v "$dirname"; cd "$dirname"
lrun_pharo
}

download_pharo () {
pi_log "Checking Pharo installation in the current directory...\n"
if ! is_pharo_installed; then
Expand All @@ -129,6 +178,15 @@ download_pharo () {
[[ ! is_pharo_installed ]] && { pi_err "Could not download Pharo, exiting\n"; exit 1; }
}

download_pharo_latest () {
pi_log "Checking latest Pharo installation in the current directory...\n"
if ! is_pharo_installed; then
pi_log "Downloading latest Pharo...\n"
exec $dApp $dPharoParams $zeroConfUrl/$pharoLatest | bash
fi
[[ ! is_pharo_installed ]] && { pi_err "Could not download latest Pharo, exiting\n"; exit 1; }
}

download_pharo_m1 () {
pi_log "Checking Pharo installation in the current directory...\n"
if ! is_pharo_installed; then
Expand All @@ -138,4 +196,16 @@ download_pharo_m1 () {
exec $dApp $dPharoParams get.pharo.org/64 | bash -
fi
[[ ! is_pharo_installed ]] && { pi_err "Could not download Pharo, exiting\n"; exit 1; }
}

# Latest version of Pharo for ZeroConf download
download_pharo_m1_latest () {
pi_log "Checking latest Pharo installation in the current directory...\n"
if ! is_pharo_installed; then
pi_log "Downloading latest Pharo...\n"
exec $dApp $zeroConfUrl
unzip latest.zip
exec $dApp $dPharoParams get.pharo.org/64/$pharoLatest | bash -
fi
[[ ! is_pharo_installed ]] && { pi_err "Could not download latest Pharo, exiting\n"; exit 1; }
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pi",
"version": "0.6.2",
"version": "0.7.0",
"description": "",
"main": "index.js",
"type": "module",
Expand Down

0 comments on commit 6501bfd

Please sign in to comment.