mirror of
https://github.com/im-tomu/fomu-toolchain.git
synced 2024-09-19 18:30:16 +00:00
Merge pull request #6 from aboyett/calculate-checksums
build: generate checksums for build files
This commit is contained in:
commit
54c7f5ffd0
@ -18,6 +18,9 @@ deploy:
|
||||
file:
|
||||
- output/*.tar.gz
|
||||
- output/*.zip
|
||||
- output/*.sha1
|
||||
- output/*.sha256
|
||||
- output/*.sha512
|
||||
file_glob: true
|
||||
skip_cleanup: true
|
||||
on:
|
||||
|
18
build.sh
18
build.sh
@ -23,12 +23,27 @@ base="$(pwd)"
|
||||
output_name="fomu-toolchain-${ARCH}-${TRAVIS_TAG}"
|
||||
output="${base}/output/${output_name}"
|
||||
input="${base}/input"
|
||||
|
||||
mkdir -p $output
|
||||
mkdir -p $input
|
||||
mkdir -p $output/bin
|
||||
|
||||
echo "${TRAVIS_TAG}" > $output/VERSION
|
||||
|
||||
checksum_output() {
|
||||
set +x
|
||||
hashes="sha1 sha256 sha512"
|
||||
local outfile hashfile
|
||||
outfile=$output$1
|
||||
|
||||
for hash in $hashes ; do
|
||||
hashfile=$outfile.$hash
|
||||
${hash}sum $outfile > $hashfile
|
||||
echo -n "$hash: " ; cat $hashfile
|
||||
done
|
||||
set -x
|
||||
}
|
||||
|
||||
case "${ARCH}" in
|
||||
"windows")
|
||||
# Python 3.7.3 (which matches the version in nextpnr)
|
||||
@ -76,6 +91,7 @@ case "${ARCH}" in
|
||||
|
||||
cd $base/output
|
||||
zip -r $output_name.zip $output_name
|
||||
checksum_output .zip
|
||||
;;
|
||||
|
||||
"macos")
|
||||
@ -108,6 +124,7 @@ case "${ARCH}" in
|
||||
|
||||
cd $base/output
|
||||
zip -r $output_name.zip $output_name
|
||||
checksum_output .zip
|
||||
;;
|
||||
|
||||
"linux_x86_64")
|
||||
@ -140,6 +157,7 @@ case "${ARCH}" in
|
||||
|
||||
cd $base/output
|
||||
tar cvzf $output_name.tar.gz $output_name
|
||||
checksum_output .tar.gz
|
||||
;;
|
||||
*)
|
||||
echo "Unrecognized architecture: ${ARCH}"
|
||||
|
Loading…
Reference in New Issue
Block a user