diff --git a/.goreleaser.yaml b/.goreleaser.yaml index e8321cb8..5cc689cf 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -38,6 +38,9 @@ archives: replacements: 386: i386 amd64: x86_64 +# format_overrides: +# - goos: windows +# format: zip checksum: name_template: 'checksums.txt' diff --git a/aemw b/aemw index 776885ce..f7a50eed 100755 --- a/aemw +++ b/aemw @@ -2,27 +2,27 @@ # Download tool -# use specific one 'vX.Y.Z' or just 'latest' -VERSION=v0.5.1 +VERSION=0.5.2 OS="darwin" ARCH="arm64" -EXECUTABLE_ZIP_URL="https://github.com/wttech/aemc/releases/$VERSION/download/aemc-cli_${OS}_${ARCH}.tar.gz" -EXECUTABLE_DIR="bin/aemc-cli/$VERSION" -EXECUTABLE_ZIP_PATH="$EXECUTABLE_DIR/aemc-cli.tar.gz" -EXECUTABLE_PATH="$EXECUTABLE_DIR/aemc-cli/aemc-cli" +TOOL_DOWNLOAD_URL="https://github.com/wttech/aemc/releases/download/v${VERSION}/aemc-cli_${OS}_${ARCH}.tar.gz" +TOOL_BIN_ROOT="bin/aemw/$VERSION" +TOOL_BIN_ARCHIVE_FILE="$TOOL_BIN_ROOT/aemc-cli.tar.gz" +TOOL_BIN_ARCHIVE_DIR="$TOOL_BIN_ROOT/aemc-cli" +TOOL_BIN_EXEC_FILE="$TOOL_BIN_ARCHIVE_DIR/aemc-cli" -if [ ! -f "$EXECUTABLE_PATH" ]; then - mkdir -p $EXECUTABLE_DIR - curl -o "$EXECUTABLE_ZIP_PATH" -OJL "$EXECUTABLE_ZIP_URL" - # TODO unpack - #chmod +x "$EXECUTABLE_PATH" +if [ ! -f "$TOOL_BIN_EXEC_FILE" ]; then + mkdir -p "$TOOL_BIN_ARCHIVE_DIR" + curl -o "$TOOL_BIN_ARCHIVE_FILE" -OJL "$TOOL_DOWNLOAD_URL" + tar -xvf "$TOOL_BIN_ARCHIVE_FILE" -C "$TOOL_BIN_ARCHIVE_DIR" + chmod +x "$TOOL_BIN_EXEC_FILE" fi # Declare provisioning API # shellcheck disable=SC2139 -alias aem="./$EXECUTABLE_PATH" +alias aem="./$TOOL_BIN_EXEC_FILE" # print provisioning step header step () {