From 1d77ea881b19aacbba132078e6ad7ca88256b2a8 Mon Sep 17 00:00:00 2001 From: "mise[bot]" <123107610+mise-en-dev@users.noreply.github.com> Date: Sat, 16 Mar 2024 23:27:30 +0000 Subject: [PATCH] Commit from GitHub Actions (test) --- e2e/assert.sh | 56 +++++++-------- scripts/build-deb.sh | 40 +++++------ scripts/build-rpm.sh | 40 +++++------ scripts/build-tarball.sh | 114 +++++++++++++++---------------- scripts/pre-release-hook.sh | 2 +- scripts/publish-s3.sh | 18 ++--- scripts/release-alpine.sh | 12 ++-- scripts/release-aur-bin.sh | 8 +-- scripts/release-aur.sh | 8 +-- scripts/release-npm.sh | 92 ++++++++++++------------- scripts/release.sh | 48 ++++++------- scripts/render-homebrew.sh | 24 +++---- scripts/render-install.sh | 24 +++---- scripts/setup-zipsign.sh | 6 +- scripts/test-standalone.sh | 4 +- scripts/update-shorthand-repo.sh | 36 +++++----- 16 files changed, 266 insertions(+), 266 deletions(-) diff --git a/e2e/assert.sh b/e2e/assert.sh index 5651ae6b24..1b3dfa93c0 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 b98c0b08eb..bcaa7ee945 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 5adb61e990..d47277b0a6 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 4738819e9d..cf8b9b3ef0 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/pre-release-hook.sh b/scripts/pre-release-hook.sh index 746c3f8085..001d6f3685 100755 --- a/scripts/pre-release-hook.sh +++ b/scripts/pre-release-hook.sh @@ -2,7 +2,7 @@ set -euxo pipefail if [[ "${NO_UPDATE:-}" == "1" ]]; then - echo "NO_UPDATE is set, skipping update" + echo "NO_UPDATE is set, skipping update" # else # cargo update && git add Cargo.lock fi diff --git a/scripts/publish-s3.sh b/scripts/publish-s3.sh index c9456c1d13..3e6a827a6c 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 2f94092c7e..5c82bec620 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 1e16394131..2b4b9a8119 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 722d392f26..6731c68010 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 8e9743584f..e36cc36653 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 c424a9afbe..0882fc607d 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 d9e14f3e01..e722598d30 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 623a200a0f..a8b5ef1ede 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/scripts/update-shorthand-repo.sh b/scripts/update-shorthand-repo.sh index cbd19a7960..19909587f8 100755 --- a/scripts/update-shorthand-repo.sh +++ b/scripts/update-shorthand-repo.sh @@ -36,23 +36,23 @@ pub static DEFAULT_SHORTHANDS: Lazy> = EOF count=0 for plugin in $asdf_plugins; do - file="asdf-plugins/plugins/$plugin" - repository=$(grep -e '^repository = ' "$file") - repository="${repository/#repository = /}" - printf "\033[2K[%03d/%d] %s\r" $((++count)) "$num_plugins" "$repository" - if [[ $repository == "https://github.com/mise-plugins/"* ]]; then - trusted+=("$plugin") - elif grep -qe '^first-party = true' "$file"; then - trusted+=("$plugin") - fi - # if [[ $repository == "https://github.com/"* ]]; then - # owner=${repository#*github.com/} - # owner=${owner%/*} - # repo=${repository#*github.com/*/} - # repo=${repo%.git} - # stars["$owner/$repo"]="$plugin" - # fi - echo " (\"$plugin\", \"$repository\")," >>src/default_shorthands.rs + file="asdf-plugins/plugins/$plugin" + repository=$(grep -e '^repository = ' "$file") + repository="${repository/#repository = /}" + printf "\033[2K[%03d/%d] %s\r" $((++count)) "$num_plugins" "$repository" + if [[ $repository == "https://github.com/mise-plugins/"* ]]; then + trusted+=("$plugin") + elif grep -qe '^first-party = true' "$file"; then + trusted+=("$plugin") + fi + # if [[ $repository == "https://github.com/"* ]]; then + # owner=${repository#*github.com/} + # owner=${owner%/*} + # repo=${repository#*github.com/*/} + # repo=${repo%.git} + # stars["$owner/$repo"]="$plugin" + # fi + echo " (\"$plugin\", \"$repository\")," >>src/default_shorthands.rs done echo "]));" >>src/default_shorthands.rs @@ -63,7 +63,7 @@ pub static TRUSTED_SHORTHANDS: Lazy> = Lazy::new(|| HashSet::from([ EOF for plugin in "${trusted[@]}"; do - echo " \"$plugin\"," >>src/default_shorthands.rs + echo " \"$plugin\"," >>src/default_shorthands.rs done echo "]));" >>src/default_shorthands.rs