Skip to content

Commit

Permalink
Check for binary list file before reading it
Browse files Browse the repository at this point in the history
  • Loading branch information
ebmifa committed May 13, 2024
1 parent 940e4f1 commit 901375b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:

env:
TAG_NAME: "${{ github.event.inputs.sui_tag || github.ref }}"
BINARY_LIST_FILE: "./binary-build-list.json"
CARGO_TERM_COLOR: always
# Disable incremental compilation.
#
Expand Down Expand Up @@ -142,13 +143,14 @@ jobs:
run: |
mkdir -p ${{ env.TMP_BUILD_DIR }}
for binary in $(cat ./binary-build-list.json | jq -r '.release_binaries[]'); do
[ ! -f ${{ env.BINARY_LIST_FILE }} ] && echo "${{ env.BINARY_LIST_FILE }} cannot be found" && exit 1
for binary in $(cat ${{ env.BINARY_LIST_FILE }} | jq -r '.release_binaries[]'); do
export binary=$(echo ${binary} | tr -d $'\r')
mv ./target/release/${binary}${{ env.extention }} ${{ env.TMP_BUILD_DIR }}/${binary}${{ env.extention }}
done
[ -f ./target/debug/sui${{ env.extention }} ] && mv ./target/debug/sui${{ env.extention }} ${{ env.TMP_BUILD_DIR }}/sui-debug${{ env.extention }}
[ -f ./external-crates/move/target/release/move-analyzer${{ env.extention }} ] && mv ./external-crates/move/target/release/move-analyzer${{ env.extention }} ${{ env.TMP_BUILD_DIR }}/move-analyzer${{ env.extention }}
mv ./target/debug/sui${{ env.extention }} ${{ env.TMP_BUILD_DIR }}/sui-debug${{ env.extention }}
mv ./external-crates/move/target/release/move-analyzer${{ env.extention }} ${{ env.TMP_BUILD_DIR }}/move-analyzer${{ env.extention }}
tar -cvzf ./tmp/sui-${{ env.sui_tag }}-${{ env.os_type }}.tgz -C ${{ env.TMP_BUILD_DIR }} .
[[ ${{ env.sui_tag }} == *"testnet"* ]] && aws s3 cp ./tmp/sui-${{ env.sui_tag }}-${{ env.os_type }}.tgz s3://sui-releases/releases/sui-${{ env.sui_tag }}-${{ env.os_type }}.tgz || true
Expand Down

0 comments on commit 901375b

Please sign in to comment.