Skip to content

Commit

Permalink
output fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Jan 15, 2025
1 parent d703046 commit feb3f43
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
# GitHub Action

```yaml
- uses: pkgxdev/setup@v2
- uses: pkgxdev/setup@v3
```
Installs the latest version of `pkgx`.

See [`action.yml`] for all inputs and outputs, but here’s the usual ones:

```yaml
- uses: pkgxdev/setup@v2
- uses: pkgxdev/setup@v3
with:
+: deno@1.30
rust@1.60 # we understand colloquial names, generally just type what you know
Expand Down
19 changes: 10 additions & 9 deletions installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ _install_pre_reqs() {

case $(cat /etc/debian_version) in
jessie/sid|8.*|stretch/sid|9.*)
apt --yes install libc-dev libstdc++-4.8-dev libgcc-4.7-dev $A $B;;
apt install --yes libc-dev libstdc++-4.8-dev libgcc-4.7-dev $A $B;;
buster/sid|10.*)
apt --yes install libc-dev libstdc++-8-dev libgcc-8-dev $A $B;;
apt install --yes libc-dev libstdc++-8-dev libgcc-8-dev $A $B;;
bullseye/sid|11.*)
apt --yes install libc-dev libstdc++-10-dev libgcc-9-dev $A $B;;
apt install --yes libc-dev libstdc++-10-dev libgcc-9-dev $A $B;;
bookworm/sid|12.*|*)
apt --yes install libc-dev libstdc++-11-dev libgcc-11-dev $A $B;;
apt install --yes libc-dev libstdc++-11-dev libgcc-11-dev $A $B;;
esac
elif test -f /etc/fedora-release; then
$SUDO yum --assumeyes install libatomic
Expand Down Expand Up @@ -129,10 +129,11 @@ _install_pkgx() {
}

_pkgx_is_old() {
v="$(/usr/local/bin/pkgx --version || echo pkgx 0)"
/usr/local/bin/pkgx --silent semverator gt \
$(curl -Ssf https://pkgx.sh/VERSION) \
$(echo $v | awk '{print $2}')
new_version=$(curl -Ssf https://pkgx.sh/VERSION)
old_version="$((/usr/local/bin/pkgx --version || echo pkgx 0) | awk '{print $2}')"
major_version=$(echo $new_version | cut -d. -f1)
/usr/local/bin/pkgx --silent semverator gt $new_version $old_version
}
_should_install_pkgx() {
Expand Down Expand Up @@ -160,7 +161,7 @@ if [ $# -gt 0 ]; then
elif [ $(basename "/$0") != 'installer.sh' ]; then
# ^^ temporary exception for action.ts
if type eval >/dev/null 2>&1; then
if [ $major_version -lt 2 ] && type eval >/dev/null 2>&1; then
# we `type eval` as on Travis there was no `eval`!
eval "$(pkgx --shellcode)" 2>/dev/null
fi
Expand Down

0 comments on commit feb3f43

Please sign in to comment.