Skip to content

Commit

Permalink
Fix checksum file generation
Browse files Browse the repository at this point in the history
Part of grafana#1750

Since we're merging the MSI package with the other built artifacts it's
simpler to generate the checksum file right before creating the GH release.
  • Loading branch information
Ivan Mirić authored and salem84 committed Feb 3, 2021
1 parent 79ff1ac commit 9c835c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,8 @@ jobs:
path: dist
- name: Remove Chocolatey package
run: rm dist/k6*.nupkg
- name: Generate checksum file
run: cd dist && sha256sum * > "k6-${VERSION}-checksums.txt"
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
18 changes: 0 additions & 18 deletions build-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,6 @@ package() {
esac
}

CHECKSUM_FILE="k6-${VERSION}-checksums.txt"
checksum() {
if command -v sha256sum > /dev/null; then
CHECKSUM_CMD=("sha256sum")
elif command -v shasum > /dev/null; then
CHECKSUM_CMD=("shasum" "-a" "256")
else
echo "ERROR: unable to find a command to compute sha-256 hash"
exit 1
fi

echo "--- Generating checksum file..."
rm -f "${OUT_DIR}/$CHECKSUM_FILE"
(cd "$OUT_DIR" && find . -maxdepth 1 -type f -printf '%P\n' | sort | xargs "${CHECKSUM_CMD[@]}" > "$CHECKSUM_FILE")
}

cleanup() {
find "$OUT_DIR" -mindepth 1 -maxdepth 1 -type d -exec rm -rf {} \;
echo "--- Cleaned ${OUT_DIR}"
Expand All @@ -97,5 +81,3 @@ package linux64 deb
package mac zip
package win32 zip
package win64 zip

checksum

0 comments on commit 9c835c4

Please sign in to comment.