diff --git a/.drone.yml b/.drone.yml index 41bdc39d..71ef8613 100644 --- a/.drone.yml +++ b/.drone.yml @@ -118,7 +118,7 @@ steps: image: openpriv/drone-gogs pull: if-not-exists environment: - BUILDFILES_KEY:ls + BUILDFILES_KEY: from_secret: buildfiles_key secrets: [gogs_account_token] when: @@ -128,6 +128,9 @@ steps: - echo $BUILDFILES_KEY > ~/id_rsab64 - base64 -d ~/id_rsab64 > ~/id_rsa - chmod 400 ~/id_rsa + - ./gen-nightly-index.sh $DIR + - scp -r -o StrictHostKeyChecking=no -i ~/id_rsa cwtch-nightly.html buildfiles@build.openprivacy.ca:/home/buildfiles/buildfiles/ + - ./uploaded-releases.sh deploy/cwtch-`cat VERSION`.apk application/vnd.android.package-archive - export DIR=flwtch-`cat COMMIT_DATE`-`cat VERSION` - mv deploy $DIR - cp -r coverage/html $DIR/coverage-tests @@ -137,12 +140,6 @@ steps: - mv ./../sha512s.txt . - cd .. - scp -r -o StrictHostKeyChecking=no -i ~/id_rsa $DIR buildfiles@build.openprivacy.ca:/home/buildfiles/buildfiles/ - - cd /drone/src/ - - ls -l - - ./gen-nightly-index.sh $DIR - - scp -r -o StrictHostKeyChecking=no -i ~/id_rsa cwtch-nightly.html buildfiles@build.openprivacy.ca:/home/buildfiles/buildfiles/ - # Upload Files to releases...if a release has been cut... - - ./uploaded-releases.sh deploy/cwtch-`cat VERSION`.apk application/vnd.android.package-archive - name: notify-gogs image: openpriv/drone-gogs diff --git a/upload-releases.sh b/upload-releases.sh index 7239ab3c..f9759164 100755 --- a/upload-releases.sh +++ b/upload-releases.sh @@ -6,7 +6,7 @@ RELEASEID=$(curl -s -X 'GET' "https://git.openprivacy.ca/api/v1/repos/$DRONE_REP echo $RELEASEID if [ "$RELEASEID" = "null" ]; then # $var is empty - exit 1 + exit 0 fi @@ -20,5 +20,5 @@ then echo "Success posting to $URL" else echo "ERROR HTTP $RESULT posting to $URL" - exit 1 + exit 0 fi