vscodium/sum.sh

40 lines
956 B
Bash
Raw Normal View History

#!/bin/bash
2019-05-18 22:15:47 -04:00
# shasum blows up in Azure, so using this
# node package which has similar syntax and identical output
if [[ "$CI_WINDOWS" == "True" ]]; then
npm i -g checksum
fi
sum_file () {
if [[ -f "$1" ]]; then
2019-05-18 22:15:47 -04:00
if [[ "$CI_WINDOWS" == "True" ]]; then
checksum -a sha256 "$1" > "$1".sha256
checksum -a sha1 "$1" > "$1".sha1
2019-05-18 22:15:47 -04:00
else
shasum -a 256 "$1" > "$1".sha256
shasum "$1" > "$1".sha1
2019-05-18 22:15:47 -04:00
fi
fi
}
if [[ "$SHOULD_BUILD" == "yes" ]]; then
if [[ "$OS_NAME" == "osx" ]]; then
sum_file VSCodium-darwin-*.zip
sum_file VSCodium*.dmg
elif [[ "$CI_WINDOWS" == "True" ]]; then
sum_file VSCodiumSetup-*.exe
sum_file VSCodiumUserSetup-*.exe
sum_file VSCodium-win32-*.zip
else # linux
2019-12-08 18:26:22 -05:00
cp out/*.AppImage .
2019-12-09 14:40:37 -05:00
cp vscode/.build/linux/deb/*/deb/*.deb .
cp vscode/.build/linux/rpm/*/*.rpm .
2019-07-04 17:03:18 -04:00
2019-07-25 12:07:08 -04:00
sum_file *.AppImage
sum_file VSCodium-linux*.tar.gz
sum_file *.deb
sum_file *.rpm
fi
fi