ci: fix weird binary checksum logic in push script

This commit is contained in:
5chdn 2018-10-01 16:58:16 +01:00
parent 8eb65a911a
commit ab6172261e
No known key found for this signature in database
GPG Key ID: 1A40871B597F5F80

View File

@ -19,24 +19,21 @@ echo ${filetest[*]}
for DIR in "${filetest[@]}";
do
cd $DIR
if [[ $DIR == "*windows*" ]];
if [[ $DIR =~ "*windows*" ]];
then
WIN=".exe";
else
WIN="";
fi
for binary in $(ls parity.sha3)
do
sha3=$(cat ${binary/sha3} | awk '{ print $1}' )
case $DIR in
x86_64* )
DATA="commit=$CI_BUILD_REF&sha3=$sha3&filename=parity$WIN&secret=$RELEASES_SECRET"
../../scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1337/push-build/$CI_BUILD_REF_NAME/$DIR"
# Kovan
../../scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1338/push-build/$CI_BUILD_REF_NAME/$DIR"
;;
esac
done
sha3=$(cat parity.sha3 | awk '{print $1}')
case $DIR in
x86_64* )
DATA="commit=$CI_BUILD_REF&sha3=$sha3&filename=parity$WIN&secret=$RELEASES_SECRET"
../../scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1337/push-build/$CI_BUILD_REF_NAME/$DIR"
# Kovan
../../scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1338/push-build/$CI_BUILD_REF_NAME/$DIR"
;;
esac
cd ..
done