forked from VSCodium/vscodium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sum.sh
executable file
·39 lines (35 loc) · 1.05 KB
/
sum.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
# 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
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
fi
}
if [[ "$SHOULD_BUILD" == "yes" ]]; then
if [[ "$TRAVIS_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
sum_file vscode/out/*.AppImage
sum_file VSCodium-linux*.tar.gz
sum_file vscode/.build/linux/deb/amd64/deb/*.deb
sum_file vscode/.build/linux/rpm/x86_64/*.rpm
cp vscode/out/*.{sha256,sha1} .
cp vscode/.build/linux/deb/amd64/deb/*.{sha256,sha1} .
cp vscode/.build/linux/rpm/x86_64/*.{sha256,sha1} .
fi
fi