Skip to content

Commit

Permalink
cirrus: fix 2
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-chavez committed Nov 9, 2020
1 parent 4b323f4 commit c32ddf0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ build_task:
bin_name=postgrest-$CIRRUS_TAG-freebsd.tar.xz
fi
echo "Uploading $bin_name to gh release: $CIRRUS_RELEASE"
release_id=$(curl -s https://api.github.com/repos/$CIRRUS_REPO_FULL_NAME/releases/tags/$CIRRUS_TAG | jq .id)
echo "Uploading $bin_name to gh release: $release_id"
tar cJf $bin_name -C /.cabal/bin postgrest
## The CIRRUS_RELEASE env var is not the same as the tag. It's an id for the release.
## Check https://cirrus-ci.org/guide/writing-tasks/#environment-variables
## We don't use ghr here because it doesn't provide freebsd binaries: https://github.com/tcnksm/ghr/issues/127
curl -X POST --data-binary @$bin_name \
-H "Authorization:token $TOKEN" \
-H "Content-Type:application/octet-stream" \
"https://uploads.github.com/repos/$CIRRUS_REPO_FULL_NAME/releases/$CIRRUS_RELEASE/assets?name=$bin_name"
"https://uploads.github.com/repos/$CIRRUS_REPO_FULL_NAME/releases/$release_id/assets?name=$bin_name"
fi

0 comments on commit c32ddf0

Please sign in to comment.