Skip to content

Commit

Permalink
update deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
sgarnotel committed Apr 5, 2019
1 parent a4a680a commit 10d39bd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .jenkins/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ sudo docker save -o freefem.tar freefem
## Compress the image
echo -e "> Compressing the archive"
sudo gzip freefem.tar
sudo chown ci freefem.tar.gz

## Deploy to GitHub releases
echo -e "> Deploy to GitHub releases"
Expand All @@ -22,10 +23,10 @@ CURRENT_VERSION=`curl 'https://api.github.com/repos/'$ORGANIZATION'/'$SOURCE_REP
echo 'Current FreeFEM version: '$CURRENT_VERSION

# Create the release (keep the upload url)
RELEASE_PARAMETERS=$(printf '{"tag_name": "%s", "target_commitish": "master", "name": "%s", "body": "FreeFEM docker - FreeFEM v%s.", "draft": false, "prerelease": false}' $CURRENT_VERSION $CURRENT_VERSION $CURRENT_VERSION)
RELEASE_PARAMETERS=$(printf '{"tag_name": "%s", "target_commitish": "master", "name": "%s", "body": "FreeFEM docker - FreeFEM %s.", "draft": false, "prerelease": false}' $CURRENT_VERSION $CURRENT_VERSION $CURRENT_VERSION)
RELEASE=`curl -H "Authorization: token $TOKEN" --data "$RELEASE_PARAMETERS" 'https://api.github.com/repos/'$ORGANIZATION'/'$REPOSITORY'/releases'`
UPLOAD_URL=`echo $RELEASE | jq -r '.upload_url'`
echo 'Upload URL: '$ASSETS_URL
echo 'Upload URL: '$UPLOAD_URL

# Upload asset
RESPONSE=`curl --data-binary "@$FILE_NAME" -H "Authorization: token $TOKEN" -H "Content-Type: application/octet-stream" "$UPLOAD_URL=$FILE_NAME"`
Expand Down

0 comments on commit 10d39bd

Please sign in to comment.