Skip to content

Commit

Permalink
Small refactoring in ci script
Browse files Browse the repository at this point in the history
  • Loading branch information
abhi-agg committed Feb 17, 2022
1 parent b37c16a commit d835970
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ jobs:
mkdir ../artifacts
cp $ARTIFACT_BASE.wasm ../artifacts/$ARTIFACT_BASE-with-wormhole.wasm
cp $ARTIFACT_BASE.js ../artifacts/$ARTIFACT_BASE-with-wormhole.js
shasum -a 256 ../artifacts/* > ../artifacts/SHA256-1
shasum -a 256 ../artifacts/* >> ../artifacts/SHA256-FILESIZE-WORMHOLE
wc -c ../artifacts/* >> ../artifacts/SHA256-FILESIZE-WORMHOLE
cp ../BERGAMOT_VERSION ../artifacts/
else
echo "Failure: Artifacts Not Present"
Expand Down Expand Up @@ -66,7 +67,8 @@ jobs:
mkdir ../artifacts
cp $ARTIFACT_BASE.wasm ../artifacts/$ARTIFACT_BASE-without-wormhole.wasm
cp $ARTIFACT_BASE.js ../artifacts/$ARTIFACT_BASE-without-wormhole.js
shasum -a 256 ../artifacts/* > ../artifacts/SHA256-2
shasum -a 256 ../artifacts/* >> ../artifacts/SHA256-FILESIZE-WITHOUT-WORMHOLE
wc -c ../artifacts/* >> ../artifacts/SHA256-FILESIZE-WITHOUT-WORMHOLE
else
echo "Failure: Artifacts Not Present"
exit 1
Expand Down Expand Up @@ -96,9 +98,8 @@ jobs:
name: "Publish Release on GitHub"
command: |
export TAG_VERSION=$(cat ./artifacts/BERGAMOT_VERSION)
ls -lsa ./artifacts/ > ./artifacts/FILESIZES
cat ./artifacts/SHA256-1 ./artifacts/SHA256-2 > ./artifacts/SHA256
rm ./artifacts/SHA256-1 ./artifacts/SHA256-2 ./artifacts/BERGAMOT_VERSION
cat ./artifacts/SHA256-FILESIZE-WITHOUT-WORMHOLE ./artifacts/SHA256-FILESIZE-WORMHOLE >> ./artifacts/SHA256-FILESIZE
rm ./artifacts/SHA256-FILESIZE-WITHOUT-WORMHOLE ./artifacts/SHA256-FILESIZE-WORMHOLE ./artifacts/BERGAMOT_VERSION
ghr -t ${GHTOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${TAG_VERSION} ./artifacts/
workflows:
Expand Down

0 comments on commit d835970

Please sign in to comment.