2019-04-13 01:11:27 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
2019-05-19 05:15:47 +03: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
|
|
|
|
|
2019-04-13 01:11:27 +03:00
|
|
|
sum_file () {
|
|
|
|
if [[ -f "$1" ]]; then
|
2019-05-19 05:15:47 +03:00
|
|
|
if [[ "$CI_WINDOWS" == "True" ]]; then
|
|
|
|
checksum -a sha256 $1 > $1.sha256
|
|
|
|
checksum -a sha1 $1 > $1.sha1
|
|
|
|
else
|
|
|
|
shasum -a 256 $1 > $1.sha256
|
|
|
|
shasum $1 > $1.sha1
|
|
|
|
fi
|
2019-04-13 01:11:27 +03:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
if [[ "$SHOULD_BUILD" == "yes" ]]; then
|
|
|
|
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
|
|
|
sum_file VSCodium-darwin-*.zip
|
2019-05-19 08:02:47 +03:00
|
|
|
sum_file VSCodium*.dmg
|
2019-05-18 05:47:03 +03:00
|
|
|
elif [[ "$CI_WINDOWS" == "True" ]]; then
|
|
|
|
sum_file VSCodiumSetup-*.exe
|
|
|
|
sum_file VSCodiumUserSetup-*.exe
|
|
|
|
sum_file VSCodium-win32-*.zip
|
2019-04-13 01:11:27 +03:00
|
|
|
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
|
2019-04-13 02:14:09 +03:00
|
|
|
sum_file vscode/.build/linux/deb/${deb_arch}/deb/*.deb
|
|
|
|
sum_file vscode/.build/linux/rpm/${rpm_arch}/*.rpm
|
2019-05-18 05:47:03 +03:00
|
|
|
cp vscode/.build/linux/deb/${deb_arch}/deb/*.{sha256,sha1} .
|
|
|
|
cp vscode/.build/linux/rpm/${rpm_arch}/*.{sha256,sha1} .
|
2019-04-13 01:11:27 +03:00
|
|
|
fi
|
|
|
|
fi
|