diff --git a/Cargo.toml b/Cargo.toml index 9db2a58f1..dbedce795 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,15 +12,15 @@ license = "MIT" keywords = ["mise"] categories = ["command-line-utilities"] include = [ - "src/**/*.rs", - "src/plugins/core/assets/**", - "src/assets/**", - "/completions/*", - "/Cargo.lock", - "/LICENSE", - "/README.md", - "/build.rs", - "/zipsign.pub", + "src/**/*.rs", + "src/plugins/core/assets/**", + "src/assets/**", + "/completions/*", + "/Cargo.lock", + "/LICENSE", + "/README.md", + "/build.rs", + "/zipsign.pub", ] rust-version = "1.74.0" build = "build.rs" @@ -78,9 +78,9 @@ regex = "1.10.3" reqwest = { version = "0.11.26", default-features = false, features = ["blocking", "json", "gzip"] } rmp-serde = "1.1.2" self_update = { version = "0.39.0", default-features = false, features = [ - "archive-tar", - "compression-flate2", - "signatures", + "archive-tar", + "compression-flate2", + "signatures", ] } serde = "1.0.197" serde_derive = "1.0.197" @@ -101,8 +101,8 @@ thiserror = "1.0.58" toml = { version = "0.8.11", features = ["parse"] } toml_edit = { version = "0.22.7", features = ["parse"] } url = "2.5.0" -usage-lib = { version="0.1.9", features = ["clap"] } -versions = { version = "6.1.0" , features=["serde"]} +usage-lib = { version = "0.1.9", features = ["clap"] } +versions = { version = "6.1.0", features = ["serde"] } walkdir = "2.5.0" which = "6.0.0" zip = { version = "0.6.6", default-features = false, features = ["deflate"] } diff --git a/README.md b/README.md index 1e7625ce9..bba2b88ad 100644 --- a/README.md +++ b/README.md @@ -17,9 +17,9 @@ ## What is it? -* Like [asdf](https://asdf-vm.com) (or [nvm](https://github.com/nvm-sh/nvm) or [pyenv](https://github.com/pyenv/pyenv) but for any language) it manages [dev tools](https://mise.jdx.dev/dev-tools/) like node, python, cmake, terraform, and [hundreds more](https://mise.jdx.dev/plugins.html). -* Like [direnv](https://github.com/direnv/direnv) it manages [environment variables](https://mise.jdx.dev/environments.html) for different project directories. -* Like [make](https://www.gnu.org/software/make/manual/make.html) it manages [tasks](https://mise.jdx.dev/tasks/) used to build and test projects. +- Like [asdf](https://asdf-vm.com) (or [nvm](https://github.com/nvm-sh/nvm) or [pyenv](https://github.com/pyenv/pyenv) but for any language) it manages [dev tools](https://mise.jdx.dev/dev-tools/) like node, python, cmake, terraform, and [hundreds more](https://mise.jdx.dev/plugins.html). +- Like [direnv](https://github.com/direnv/direnv) it manages [environment variables](https://mise.jdx.dev/environments.html) for different project directories. +- Like [make](https://www.gnu.org/software/make/manual/make.html) it manages [tasks](https://mise.jdx.dev/tasks/) used to build and test projects. ## Migrating from rtx diff --git a/e2e/assert.sh b/e2e/assert.sh index 5651ae6b2..1b3dfa93c 100755 --- a/e2e/assert.sh +++ b/e2e/assert.sh @@ -1,44 +1,44 @@ #!/usr/bin/env bash assert() { - local actual - actual="$(bash -c "$1")" - if [[ "$actual" != "$2" ]]; then - echo "Expected '$2' but got '$actual'" - exit 1 - fi + local actual + actual="$(bash -c "$1")" + if [[ "$actual" != "$2" ]]; then + echo "Expected '$2' but got '$actual'" + exit 1 + fi } assert_contains() { - local actual - actual="$(bash -c "$1")" - if [[ "$actual" != *"$2"* ]]; then - echo "Expected '$2' to be in '$actual'" - exit 1 - fi + local actual + actual="$(bash -c "$1")" + if [[ "$actual" != *"$2"* ]]; then + echo "Expected '$2' to be in '$actual'" + exit 1 + fi } assert_not_contains() { - local actual - actual="$(bash -c "$1")" - if [[ "$actual" == *"$2"* ]]; then - echo "Expected '$2' to not be in '$actual'" - exit 1 - fi + local actual + actual="$(bash -c "$1")" + if [[ "$actual" == *"$2"* ]]; then + echo "Expected '$2' to not be in '$actual'" + exit 1 + fi } assert_fail() { - if bash -c "$1" 2>&1; then - echo "Expected failure but succeeded" - exit 1 - fi + if bash -c "$1" 2>&1; then + echo "Expected failure but succeeded" + exit 1 + fi } assert_matches() { - local actual - actual="$(bash -c "$1")" - if [[ ! "$actual" =~ $2 ]]; then - echo "Expected '$2' to match '$actual'" - exit 1 - fi + local actual + actual="$(bash -c "$1")" + if [[ ! "$actual" =~ $2 ]]; then + echo "Expected '$2' to match '$actual'" + exit 1 + fi } diff --git a/scripts/build-deb.sh b/scripts/build-deb.sh index b98c0b08e..bcaa7ee94 100755 --- a/scripts/build-deb.sh +++ b/scripts/build-deb.sh @@ -8,29 +8,29 @@ touch mise/lib/.disable-self-update tar -xvJf "dist/mise-$MISE_VERSION-linux-x64.tar.xz" fpm -s dir -t deb \ - --name mise \ - --license MIT \ - --version "${MISE_VERSION#v*}" \ - --architecture amd64 \ - --description "The front-end to your dev env" \ - --url "https://github.com/jdx/mise" \ - --maintainer "Jeff Dickey @jdx" \ - mise/bin/mise=/usr/bin/mise \ - mise/lib/.disable-self-update=/usr/lib/mise/.disable-self-update \ - mise/man/man1/mise.1=/usr/share/man/man1/mise.1 + --name mise \ + --license MIT \ + --version "${MISE_VERSION#v*}" \ + --architecture amd64 \ + --description "The front-end to your dev env" \ + --url "https://github.com/jdx/mise" \ + --maintainer "Jeff Dickey @jdx" \ + mise/bin/mise=/usr/bin/mise \ + mise/lib/.disable-self-update=/usr/lib/mise/.disable-self-update \ + mise/man/man1/mise.1=/usr/share/man/man1/mise.1 tar -xvJf "dist/mise-$MISE_VERSION-linux-arm64.tar.xz" fpm -s dir -t deb \ - --name mise \ - --license MIT \ - --version "${MISE_VERSION#v*}" \ - --architecture arm64 \ - --description "The front-end to your dev env" \ - --url "https://github.com/jdx/mise" \ - --maintainer "Jeff Dickey @jdx" \ - mise/bin/mise=/usr/bin/mise \ - mise/lib/.disable-self-update=/usr/lib/mise/.disable-self-update \ - mise/man/man1/mise.1=/usr/share/man/man1/mise.1 + --name mise \ + --license MIT \ + --version "${MISE_VERSION#v*}" \ + --architecture arm64 \ + --description "The front-end to your dev env" \ + --url "https://github.com/jdx/mise" \ + --maintainer "Jeff Dickey @jdx" \ + mise/bin/mise=/usr/bin/mise \ + mise/lib/.disable-self-update=/usr/lib/mise/.disable-self-update \ + mise/man/man1/mise.1=/usr/share/man/man1/mise.1 mkdir -p dist/deb/pool/main cp -v ./*.deb dist/deb/pool/main diff --git a/scripts/build-rpm.sh b/scripts/build-rpm.sh index 5adb61e99..d47277b0a 100755 --- a/scripts/build-rpm.sh +++ b/scripts/build-rpm.sh @@ -8,29 +8,29 @@ touch mise/lib/.disable-self-update tar -xvJf "dist/mise-$MISE_VERSION-linux-x64.tar.xz" fpm -s dir -t rpm \ - --name mise \ - --license MIT \ - --version "${MISE_VERSION#v*}" \ - --architecture x86_64 \ - --description "The front-end to your dev env" \ - --url "https://github.com/jdx/mise" \ - --maintainer "Jeff Dickey @jdx" \ - mise/bin/mise=/usr/bin/mise \ - mise/lib/.disable-self-update=/usr/lib/mise/.disable-self-update \ - mise/man/man1/mise.1=/usr/share/man/man1/mise.1 + --name mise \ + --license MIT \ + --version "${MISE_VERSION#v*}" \ + --architecture x86_64 \ + --description "The front-end to your dev env" \ + --url "https://github.com/jdx/mise" \ + --maintainer "Jeff Dickey @jdx" \ + mise/bin/mise=/usr/bin/mise \ + mise/lib/.disable-self-update=/usr/lib/mise/.disable-self-update \ + mise/man/man1/mise.1=/usr/share/man/man1/mise.1 tar -xvJf "dist/mise-$MISE_VERSION-linux-arm64.tar.xz" fpm -s dir -t rpm \ - --name mise \ - --license MIT \ - --version "${MISE_VERSION#v*}" \ - --architecture aarch64 \ - --description "The front-end to your dev env" \ - --url "https://github.com/jdx/mise" \ - --maintainer "Jeff Dickey @jdx" \ - mise/bin/mise=/usr/bin/mise \ - mise/lib/.disable-self-update=/usr/lib/mise/.disable-self-update \ - mise/man/man1/mise.1=/usr/share/man/man1/mise.1 + --name mise \ + --license MIT \ + --version "${MISE_VERSION#v*}" \ + --architecture aarch64 \ + --description "The front-end to your dev env" \ + --url "https://github.com/jdx/mise" \ + --maintainer "Jeff Dickey @jdx" \ + mise/bin/mise=/usr/bin/mise \ + mise/lib/.disable-self-update=/usr/lib/mise/.disable-self-update \ + mise/man/man1/mise.1=/usr/share/man/man1/mise.1 cat <~/.rpmmacros %_signature gpg diff --git a/scripts/build-tarball.sh b/scripts/build-tarball.sh index 4738819e9..cf8b9b3ef 100755 --- a/scripts/build-tarball.sh +++ b/scripts/build-tarball.sh @@ -2,75 +2,75 @@ set -euo pipefail error() { - echo "$@" >&2 - exit 1 + echo "$@" >&2 + exit 1 } NAME="$1" shift for arg in "$@"; do - if [ "${next_target:-}" = 1 ]; then - next_target= - TARGET="$arg" - continue - fi - case "$arg" in - --target) - next_target=1 - ;; - *) ;; + if [ "${next_target:-}" = 1 ]; then + next_target= + TARGET="$arg" + continue + fi + case "$arg" in + --target) + next_target=1 + ;; + *) ;; - esac + esac done RUST_TRIPLE=${TARGET:-$(rustc -vV | grep ^host: | cut -d ' ' -f2)} #region os/arch get_os() { - case "$RUST_TRIPLE" in - *-apple-darwin*) - echo "macos" - ;; - *-linux-*) - echo "linux" - ;; - *) - error "unsupported OS: $RUST_TRIPLE" - ;; - esac + case "$RUST_TRIPLE" in + *-apple-darwin*) + echo "macos" + ;; + *-linux-*) + echo "linux" + ;; + *) + error "unsupported OS: $RUST_TRIPLE" + ;; + esac } get_arch() { - case "$RUST_TRIPLE" in - aarch64-*) - echo "arm64" - ;; - arm-*) - echo "armv6" - ;; - armv7-*) - echo "armv7" - ;; - x86_64-*) - echo "x64" - ;; - universal2-*) - echo "universal" - ;; - *) - error "unsupported arch: $RUST_TRIPLE" - ;; - esac + case "$RUST_TRIPLE" in + aarch64-*) + echo "arm64" + ;; + arm-*) + echo "armv6" + ;; + armv7-*) + echo "armv7" + ;; + x86_64-*) + echo "x64" + ;; + universal2-*) + echo "universal" + ;; + *) + error "unsupported arch: $RUST_TRIPLE" + ;; + esac } get_suffix() { - case "$RUST_TRIPLE" in - *-musl | *-musleabi | *-musleabihf) - echo "-musl" - ;; - *) - echo "" - ;; - esac + case "$RUST_TRIPLE" in + *-musl | *-musleabi | *-musleabihf) + echo "-musl" + ;; + *) + echo "" + ;; + esac } #endregion @@ -79,11 +79,11 @@ VERSION=$(./scripts/get-version.sh) BASENAME=$NAME-$VERSION-$(get_os)-$(get_arch)$(get_suffix) if command -v cross >/dev/null; then - cross build "$@" + cross build "$@" elif command -v zig >/dev/null; then - cargo zigbuild "$@" + cargo zigbuild "$@" else - cargo build "$@" + cargo build "$@" fi mkdir -p dist/mise/bin mkdir -p dist/mise/man/man1 @@ -99,8 +99,8 @@ tar -cJf "$BASENAME.tar.xz" mise tar -czf "$BASENAME.tar.gz" mise if [ -f ~/.zipsign/mise.priv ]; then - zipsign sign tar "$BASENAME.tar.gz" ~/.zipsign/mise.priv - zipsign verify tar "$BASENAME.tar.gz" ../zipsign.pub + zipsign sign tar "$BASENAME.tar.gz" ~/.zipsign/mise.priv + zipsign verify tar "$BASENAME.tar.gz" ../zipsign.pub fi ls -oh "$BASENAME.tar.xz" diff --git a/scripts/publish-s3.sh b/scripts/publish-s3.sh index c9456c1d1..3e6a827a6 100755 --- a/scripts/publish-s3.sh +++ b/scripts/publish-s3.sh @@ -28,18 +28,18 @@ export CLOUDFLARE_ACCOUNT_ID=6e243906ff257b965bcae8025c2fc344 # jdx.dev curl --fail-with-body -X POST "https://api.cloudflare.com/client/v4/zones/90dfd7997bdcfa8579c52d8ee8dd4cd1/purge_cache" \ - -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ - -H "Content-Type: application/json" \ - --data '{ "purge_everything": true }' + -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ + -H "Content-Type: application/json" \ + --data '{ "purge_everything": true }' # rtx.pub curl --fail-with-body -X POST "https://api.cloudflare.com/client/v4/zones/80d977fd09f01db52bec165778088891/purge_cache" \ - -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ - -H "Content-Type: application/json" \ - --data '{ "purge_everything": true }' + -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ + -H "Content-Type: application/json" \ + --data '{ "purge_everything": true }' # mise.run curl --fail-with-body -X POST "https://api.cloudflare.com/client/v4/zones/782fc08181b7bbd26c529a00df52a277/purge_cache" \ - -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ - -H "Content-Type: application/json" \ - --data '{ "purge_everything": true }' + -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ + -H "Content-Type: application/json" \ + --data '{ "purge_everything": true }' diff --git a/scripts/release-alpine.sh b/scripts/release-alpine.sh index 2f94092c7..5c82bec62 100755 --- a/scripts/release-alpine.sh +++ b/scripts/release-alpine.sh @@ -31,19 +31,19 @@ apkbuild-lint APKBUILD git add APKBUILD if git diff --cached --exit-code; then - echo "No changes to commit" - exit 0 + echo "No changes to commit" + exit 0 fi git commit -m "community/mise: upgrade to ${MISE_VERSION#v}" if [ "$DRY_RUN" == 0 ]; then - git push jdxcode -f + git push jdxcode -f fi open_mr="$(glab mr list -R alpine/aports --author=@me)" if [[ "$open_mr" != "Showing"* ]]; then - if [ "$DRY_RUN" == 0 ]; then - glab mr create --fill --yes -H jdxcode/aports -R alpine/aports - fi + if [ "$DRY_RUN" == 0 ]; then + glab mr create --fill --yes -H jdxcode/aports -R alpine/aports + fi fi #git show diff --git a/scripts/release-aur-bin.sh b/scripts/release-aur-bin.sh index 1e1639413..2b4b9a811 100755 --- a/scripts/release-aur-bin.sh +++ b/scripts/release-aur-bin.sh @@ -8,7 +8,7 @@ TAR_GZ_URI="https://github.com/jdx/mise/releases/download/$MISE_VERSION/mise-$MI SHA512=$(curl -fsSL "$TAR_GZ_URI" | sha512sum | awk '{print $1}') if [ ! -d aur-bin ]; then - git clone ssh://aur@aur.archlinux.org/mise-bin.git aur-bin + git clone ssh://aur@aur.archlinux.org/mise-bin.git aur-bin fi git -C aur-bin pull @@ -74,11 +74,11 @@ git config user.name mise-en-dev git config user.email 123107610+mise-en-dev@users.noreply.github.com git add .SRCINFO PKGBUILD if git diff-index --quiet HEAD --; then - echo "No changes to PKGBUILD or .SRCINFO" - exit 0 + echo "No changes to PKGBUILD or .SRCINFO" + exit 0 fi git diff --cached git commit -m "mise ${MISE_VERSION#v}" if [[ "$DRY_RUN" == 0 ]]; then - git push + git push fi diff --git a/scripts/release-aur.sh b/scripts/release-aur.sh index 722d392f2..6731c6801 100755 --- a/scripts/release-aur.sh +++ b/scripts/release-aur.sh @@ -6,7 +6,7 @@ MISE_VERSION=$(./scripts/get-version.sh) SHA512=$(curl -fsSL "https://github.com/jdx/mise/archive/$MISE_VERSION.tar.gz" | sha512sum | awk '{print $1}') if [ ! -d aur ]; then - git clone ssh://aur@aur.archlinux.org/mise.git aur + git clone ssh://aur@aur.archlinux.org/mise.git aur fi git -C aur pull @@ -79,11 +79,11 @@ git config user.name mise-en-dev git config user.email 123107610+mise-en-dev@users.noreply.github.com git add .SRCINFO PKGBUILD if git diff-index --quiet HEAD --; then - echo "No changes to PKGBUILD or .SRCINFO" - exit 0 + echo "No changes to PKGBUILD or .SRCINFO" + exit 0 fi git diff --cached git commit -m "mise ${MISE_VERSION#v}" if [ "$DRY_RUN" == 0 ]; then - git push + git push fi diff --git a/scripts/release-npm.sh b/scripts/release-npm.sh index 8e9743584..e36cc3665 100755 --- a/scripts/release-npm.sh +++ b/scripts/release-npm.sh @@ -2,52 +2,52 @@ set -euxo pipefail error() { - echo "$@" >&2 - exit 1 + echo "$@" >&2 + exit 1 } if [[ -z "${NODE_AUTH_TOKEN:-}" ]]; then - echo "NODE_AUTH_TOKEN must be set" >&2 - exit 0 + echo "NODE_AUTH_TOKEN must be set" >&2 + exit 0 fi mkdir -p "$RELEASE_DIR/npm" dist_tag_from_version() { - IFS="-" read -r -a version_split <<<"$1" - IFS="." read -r -a version_split <<<"${version_split[1]:-latest}" - echo "${version_split[0]}" + IFS="-" read -r -a version_split <<<"$1" + IFS="." read -r -a version_split <<<"${version_split[1]:-latest}" + echo "${version_split[0]}" } dist_tag="$(dist_tag_from_version "$MISE_VERSION")" platforms=( - linux-x64 - linux-x64-musl - linux-arm64 - linux-arm64-musl - linux-armv6 - linux-armv6-musl - linux-armv7 - linux-armv7-musl - macos-x64 - macos-arm64 + linux-x64 + linux-x64-musl + linux-arm64 + linux-arm64-musl + linux-armv6 + linux-armv6-musl + linux-armv7 + linux-armv7-musl + macos-x64 + macos-arm64 ) for platform in "${platforms[@]}"; do - # shellcheck disable=SC2206 - platform_split=(${platform//-/ }) - os="${platform_split[0]}" - arch="${platform_split[1]}" - - if [[ "$os" == "macos" ]]; then - os="darwin" - fi - - cp "$RELEASE_DIR/$MISE_VERSION/mise-$MISE_VERSION-$platform.tar.gz" "$RELEASE_DIR/mise-latest-$platform.tar.gz" - cp "$RELEASE_DIR/$MISE_VERSION/mise-$MISE_VERSION-$platform.tar.xz" "$RELEASE_DIR/mise-latest-$platform.tar.xz" - tar -xzvf "$RELEASE_DIR/mise-latest-$platform.tar.gz" -C "$RELEASE_DIR" - rm -rf "$RELEASE_DIR/npm" - mv "$RELEASE_DIR/mise" "$RELEASE_DIR/npm" - cat <"$RELEASE_DIR/npm/package.json" + # shellcheck disable=SC2206 + platform_split=(${platform//-/ }) + os="${platform_split[0]}" + arch="${platform_split[1]}" + + if [[ "$os" == "macos" ]]; then + os="darwin" + fi + + cp "$RELEASE_DIR/$MISE_VERSION/mise-$MISE_VERSION-$platform.tar.gz" "$RELEASE_DIR/mise-latest-$platform.tar.gz" + cp "$RELEASE_DIR/$MISE_VERSION/mise-$MISE_VERSION-$platform.tar.xz" "$RELEASE_DIR/mise-latest-$platform.tar.xz" + tar -xzvf "$RELEASE_DIR/mise-latest-$platform.tar.gz" -C "$RELEASE_DIR" + rm -rf "$RELEASE_DIR/npm" + mv "$RELEASE_DIR/mise" "$RELEASE_DIR/npm" + cat <"$RELEASE_DIR/npm/package.json" { "name": "$NPM_PREFIX-$os-$arch", "version": "$MISE_VERSION", @@ -68,16 +68,16 @@ for platform in "${platforms[@]}"; do "cpu": "$arch" } EOF - pushd "$RELEASE_DIR/npm" - tree || true - if [ "$DRY_RUN" != "0" ]; then - echo DRY_RUN - echo npm publish --access public --tag "$dist_tag" - echo DRY_RUN - else - npm publish --access public --tag "$dist_tag" || true - fi - popd + pushd "$RELEASE_DIR/npm" + tree || true + if [ "$DRY_RUN" != "0" ]; then + echo DRY_RUN + echo npm publish --access public --tag "$dist_tag" + echo DRY_RUN + else + npm publish --access public --tag "$dist_tag" || true + fi + popd done cat <"$RELEASE_DIR/npm/installArchSpecificPackage.js" @@ -168,10 +168,10 @@ cat <"$RELEASE_DIR/npm/package.json" EOF pushd "$RELEASE_DIR/npm" if [ "$DRY_RUN" != "0" ]; then - echo DRY_RUN - echo npm publish --access public --tag "$dist_tag" - echo DRY_RUN + echo DRY_RUN + echo npm publish --access public --tag "$dist_tag" + echo DRY_RUN else - npm publish --access public --tag "$dist_tag" || true + npm publish --access public --tag "$dist_tag" || true fi popd diff --git a/scripts/release.sh b/scripts/release.sh index c424a9afb..0882fc607 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -20,23 +20,23 @@ find artifacts -name 'tarball-*' -exec sh -c ' ' sh {} \; platforms=( - linux-x64 - linux-x64-musl - linux-arm64 - linux-arm64-musl - linux-armv6 - linux-armv6-musl - linux-armv7 - linux-armv7-musl - macos-x64 - macos-arm64 + linux-x64 + linux-x64-musl + linux-arm64 + linux-arm64-musl + linux-armv6 + linux-armv6-musl + linux-armv7 + linux-armv7-musl + macos-x64 + macos-arm64 ) for platform in "${platforms[@]}"; do - cp "$RELEASE_DIR/$MISE_VERSION/mise-$MISE_VERSION-$platform.tar.gz" "$RELEASE_DIR/mise-latest-$platform.tar.gz" - cp "$RELEASE_DIR/$MISE_VERSION/mise-$MISE_VERSION-$platform.tar.xz" "$RELEASE_DIR/mise-latest-$platform.tar.xz" - tar -xvzf "$RELEASE_DIR/$MISE_VERSION/mise-$MISE_VERSION-$platform.tar.gz" - cp -v mise/bin/mise "$RELEASE_DIR/mise-latest-$platform" - cp -v mise/bin/mise "$RELEASE_DIR/$MISE_VERSION/mise-$MISE_VERSION-$platform" + cp "$RELEASE_DIR/$MISE_VERSION/mise-$MISE_VERSION-$platform.tar.gz" "$RELEASE_DIR/mise-latest-$platform.tar.gz" + cp "$RELEASE_DIR/$MISE_VERSION/mise-$MISE_VERSION-$platform.tar.xz" "$RELEASE_DIR/mise-latest-$platform.tar.xz" + tar -xvzf "$RELEASE_DIR/$MISE_VERSION/mise-$MISE_VERSION-$platform.tar.gz" + cp -v mise/bin/mise "$RELEASE_DIR/mise-latest-$platform" + cp -v mise/bin/mise "$RELEASE_DIR/$MISE_VERSION/mise-$MISE_VERSION-$platform" done echo "::group::Checksums" @@ -64,21 +64,21 @@ shellcheck "$RELEASE_DIR"/install.sh gpg -u 8B81C9D17413A06D --output "$RELEASE_DIR"/install.sh.sig --sign "$RELEASE_DIR"/install.sh if [[ "$DRY_RUN" != 1 ]]; then - echo "::group::Publish npm @jdxcode/mise" - NPM_PREFIX=@jdxcode/mise ./mise/scripts/release-npm.sh - # echo "::group::Publish npm mise-cli" - # NPM_PREFIX=mise-cli ./mise/scripts/release-npm.sh - echo "::group::Publish r2" - ./mise/scripts/publish-r2.sh + echo "::group::Publish npm @jdxcode/mise" + NPM_PREFIX=@jdxcode/mise ./mise/scripts/release-npm.sh + # echo "::group::Publish npm mise-cli" + # NPM_PREFIX=mise-cli ./mise/scripts/release-npm.sh + echo "::group::Publish r2" + ./mise/scripts/publish-r2.sh fi echo "::group::Publish mise-docs" cp ./mise/docs/cli-reference.md ./mise-docs/cli/index.md pushd mise-docs if [[ -z $(git status -s) ]]; then - echo "No changes to docs" + echo "No changes to docs" else - git add cli/index.md - git commit -m "mise ${MISE_VERSION#v}" + git add cli/index.md + git commit -m "mise ${MISE_VERSION#v}" fi popd diff --git a/scripts/render-homebrew.sh b/scripts/render-homebrew.sh index d9e14f3e0..e722598d3 100755 --- a/scripts/render-homebrew.sh +++ b/scripts/render-homebrew.sh @@ -3,15 +3,15 @@ set -euxo pipefail # shellcheck disable=SC2016 MISE_VERSION=${MISE_VERSION#v*} \ - MISE_CHECKSUM_LINUX_X86_64=$(grep "mise-v$MISE_VERSION-linux-x64.tar.xz" "$RELEASE_DIR/v$MISE_VERSION/SHASUMS256.txt" | cut -d ' ' -f1) \ - MISE_CHECKSUM_LINUX_X86_64_MUSL=$(grep "mise-v$MISE_VERSION-linux-x64-musl.tar.xz" "$RELEASE_DIR/v$MISE_VERSION/SHASUMS256.txt" | cut -d ' ' -f1) \ - MISE_CHECKSUM_LINUX_ARM64=$(grep "mise-v$MISE_VERSION-linux-arm64.tar.xz" "$RELEASE_DIR/v$MISE_VERSION/SHASUMS256.txt" | cut -d ' ' -f1) \ - MISE_CHECKSUM_LINUX_ARM64_MUSL=$(grep "mise-v$MISE_VERSION-linux-arm64-musl.tar.xz" "$RELEASE_DIR/v$MISE_VERSION/SHASUMS256.txt" | cut -d ' ' -f1) \ - MISE_CHECKSUM_LINUX_ARMV6=$(grep "mise-v$MISE_VERSION-linux-armv6.tar.xz" "$RELEASE_DIR/v$MISE_VERSION/SHASUMS256.txt" | cut -d ' ' -f1) \ - MISE_CHECKSUM_LINUX_ARMV6_MUSL=$(grep "mise-v$MISE_VERSION-linux-armv6-musl.tar.xz" "$RELEASE_DIR/v$MISE_VERSION/SHASUMS256.txt" | cut -d ' ' -f1) \ - MISE_CHECKSUM_LINUX_ARMV7=$(grep "mise-v$MISE_VERSION-linux-armv7.tar.xz" "$RELEASE_DIR/v$MISE_VERSION/SHASUMS256.txt" | cut -d ' ' -f1) \ - MISE_CHECKSUM_LINUX_ARMV7_MUSL=$(grep "mise-v$MISE_VERSION-linux-armv7-musl.tar.xz" "$RELEASE_DIR/v$MISE_VERSION/SHASUMS256.txt" | cut -d ' ' -f1) \ - MISE_CHECKSUM_MACOS_X86_64=$(grep "mise-v$MISE_VERSION-macos-x64.tar.xz" "$RELEASE_DIR/v$MISE_VERSION/SHASUMS256.txt" | cut -d ' ' -f1) \ - MISE_CHECKSUM_MACOS_ARM64=$(grep "mise-v$MISE_VERSION-macos-arm64.tar.xz" "$RELEASE_DIR/v$MISE_VERSION/SHASUMS256.txt" | cut -d ' ' -f1) \ - envsubst '$MISE_VERSION,$MISE_CHECKSUM_LINUX_X86_64,$MISE_CHECKSUM_LINUX_ARM64,$MISE_CHECKSUM_MACOS_X86_64,$MISE_CHECKSUM_MACOS_ARM64' \ - /dev/null 2>&1; then - cargo install zipsign + cargo install zipsign fi mkdir -p ~/.zipsign diff --git a/scripts/test-standalone.sh b/scripts/test-standalone.sh index 623a200a0..a8b5ef1ed 100755 --- a/scripts/test-standalone.sh +++ b/scripts/test-standalone.sh @@ -14,7 +14,7 @@ shellcheck tmp/install.sh ./tmp/install.sh if [[ ! "$("$HOME/.local/bin/mise" -v)" =~ ^${MISE_VERSION//v/} ]]; then - echo "mise version mismatch" - exit 1 + echo "mise version mismatch" + exit 1 fi rm -rf "$RELEASE_DIR" diff --git a/test/fixtures/signal-test.js b/test/fixtures/signal-test.js index 35032637a..c202b1fe0 100644 --- a/test/fixtures/signal-test.js +++ b/test/fixtures/signal-test.js @@ -1,14 +1,14 @@ -let i = 3 +let i = 3; -process.on('SIGINT', function () { +process.on("SIGINT", function () { if (i > 0) { - console.log(`Got SIGINT. Press Control-D to exit. ${i} times left`) - i-- + console.log(`Got SIGINT. Press Control-D to exit. ${i} times left`); + i--; } else { - process.exit() + process.exit(); } -}) +}); // wait for 60 seconds -setTimeout(function () {}, 60000) -console.log('Running. Press Control-C to test.') +setTimeout(function () {}, 60000); +console.log("Running. Press Control-C to test.");