mirror of
https://github.com/im-tomu/fomu-toolchain.git
synced 2024-09-20 02:40:08 +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:
|
file:
|
||||||
- output/*.tar.gz
|
- output/*.tar.gz
|
||||||
- output/*.zip
|
- output/*.zip
|
||||||
|
- output/*.sha1
|
||||||
|
- output/*.sha256
|
||||||
|
- output/*.sha512
|
||||||
file_glob: true
|
file_glob: true
|
||||||
skip_cleanup: true
|
skip_cleanup: true
|
||||||
on:
|
on:
|
||||||
|
18
build.sh
18
build.sh
@ -23,12 +23,27 @@ base="$(pwd)"
|
|||||||
output_name="fomu-toolchain-${ARCH}-${TRAVIS_TAG}"
|
output_name="fomu-toolchain-${ARCH}-${TRAVIS_TAG}"
|
||||||
output="${base}/output/${output_name}"
|
output="${base}/output/${output_name}"
|
||||||
input="${base}/input"
|
input="${base}/input"
|
||||||
|
|
||||||
mkdir -p $output
|
mkdir -p $output
|
||||||
mkdir -p $input
|
mkdir -p $input
|
||||||
mkdir -p $output/bin
|
mkdir -p $output/bin
|
||||||
|
|
||||||
echo "${TRAVIS_TAG}" > $output/VERSION
|
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
|
case "${ARCH}" in
|
||||||
"windows")
|
"windows")
|
||||||
# Python 3.7.3 (which matches the version in nextpnr)
|
# Python 3.7.3 (which matches the version in nextpnr)
|
||||||
@ -76,6 +91,7 @@ case "${ARCH}" in
|
|||||||
|
|
||||||
cd $base/output
|
cd $base/output
|
||||||
zip -r $output_name.zip $output_name
|
zip -r $output_name.zip $output_name
|
||||||
|
checksum_output .zip
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"macos")
|
"macos")
|
||||||
@ -108,6 +124,7 @@ case "${ARCH}" in
|
|||||||
|
|
||||||
cd $base/output
|
cd $base/output
|
||||||
zip -r $output_name.zip $output_name
|
zip -r $output_name.zip $output_name
|
||||||
|
checksum_output .zip
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"linux_x86_64")
|
"linux_x86_64")
|
||||||
@ -140,6 +157,7 @@ case "${ARCH}" in
|
|||||||
|
|
||||||
cd $base/output
|
cd $base/output
|
||||||
tar cvzf $output_name.tar.gz $output_name
|
tar cvzf $output_name.tar.gz $output_name
|
||||||
|
checksum_output .tar.gz
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unrecognized architecture: ${ARCH}"
|
echo "Unrecognized architecture: ${ARCH}"
|
||||||
|
Loading…
Reference in New Issue
Block a user