2018-10-02 01:03:58 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e # fail on any error
|
|
|
|
set -u # treat unset variables as error
|
|
|
|
|
|
|
|
echo "__________Register Release__________"
|
|
|
|
DATA="secret=$RELEASES_SECRET"
|
|
|
|
|
|
|
|
echo "Pushing release to Mainnet"
|
2018-10-09 15:32:07 +02:00
|
|
|
./scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1337/push-release/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}/$CI_COMMIT_SHA"
|
2018-10-02 01:03:58 +02:00
|
|
|
|
|
|
|
echo "Pushing release to Kovan"
|
2018-10-09 15:32:07 +02:00
|
|
|
./scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1338/push-release/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}/$CI_COMMIT_SHA"
|
2018-10-02 01:03:58 +02:00
|
|
|
|
|
|
|
cd artifacts
|
|
|
|
ls -l | sort -k9
|
|
|
|
filetest=( * )
|
|
|
|
echo ${filetest[*]}
|
|
|
|
for DIR in "${filetest[@]}";
|
|
|
|
do
|
|
|
|
cd $DIR
|
|
|
|
if [[ $DIR =~ "windows" ]];
|
|
|
|
then
|
|
|
|
WIN=".exe";
|
|
|
|
else
|
|
|
|
WIN="";
|
|
|
|
fi
|
|
|
|
sha3=$(cat parity.sha3 | awk '{print $1}')
|
|
|
|
case $DIR in
|
|
|
|
x86_64* )
|
|
|
|
DATA="commit=$CI_COMMIT_SHA&sha3=$sha3&filename=parity$WIN&secret=$RELEASES_SECRET"
|
2018-10-09 15:32:07 +02:00
|
|
|
../../scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1337/push-build/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}/$DIR"
|
2018-10-02 01:03:58 +02:00
|
|
|
# Kovan
|
2018-10-09 15:32:07 +02:00
|
|
|
../../scripts/gitlab/safe-curl.sh $DATA "http://update.parity.io:1338/push-build/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}/$DIR"
|
2018-10-02 01:03:58 +02:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
cd ..
|
|
|
|
done
|
|
|
|
|
|
|
|
echo "__________Push binaries to AWS S3____________"
|
|
|
|
aws configure set aws_access_key_id $s3_key
|
|
|
|
aws configure set aws_secret_access_key $s3_secret
|
2018-10-09 15:32:07 +02:00
|
|
|
|
|
|
|
case "${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}" in
|
|
|
|
(beta|stable|nightly)
|
2018-12-05 15:02:37 +01:00
|
|
|
export S3_BUCKET=releases.parity.io/ethereum;
|
2018-10-09 15:32:07 +02:00
|
|
|
;;
|
|
|
|
(*)
|
2018-10-02 01:03:58 +02:00
|
|
|
export S3_BUCKET=builds-parity;
|
2018-10-09 15:32:07 +02:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
aws s3 sync ./ s3://$S3_BUCKET/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}/
|
|
|
|
|