Compute and upload sha256 sums for build artifacts

This commit is contained in:
Peter Squicciarini
2019-04-12 15:11:27 -07:00
parent 6a307fcc6d
commit 33bc3b2f8b
3 changed files with 46 additions and 15 deletions

28
sum.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/bin/bash
sum_file () {
if [[ -f "$1" ]]; then
shasum -a 256 $1 > $1.sha256
fi
}
if [[ "$SHOULD_BUILD" == "yes" ]]; then
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
sum_file VSCodium-darwin-*.zip
elif [[ "$CI_WINDOWS" == "True" ]]; then
sum_file VSCodium-win32*.zip
sum_file VSCodiumSetup*.exe
sum_file VSCodiumUserSetup*.exe
else # linux
if [[ "$BUILDARCH" == "x64" ]]; then
deb_arch=amd64
rpm_arch=x86_64
elif [[ "$BUILDARCH" == "ia32" ]]; then
deb_arch=i386
rpm_arch=i386
fi
sum_file VSCodium-linux*.tar.gz
sum_file vscode/.build/linux/deb/$(arch)/deb/*.deb
sum_file vscode/.build/linux/rpm/$(arch_alt)/*.rpm
fi
fi