Commit 5d8eb097 by Arun Babu Neelicattu

cirrus: find release id if not provided

parent ce3f7632
...@@ -39,7 +39,7 @@ release_task: ...@@ -39,7 +39,7 @@ release_task:
matrix: matrix:
- image_family: freebsd-12-1-snap - image_family: freebsd-12-1-snap
- image_family: freebsd-11-3-snap - image_family: freebsd-11-3-snap
python_script: pkg install -y curl bash python3 python27 python35 python36 python37 python38 python_script: pkg install -y curl bash jq python3 python27 python35 python36 python37 python38
pip_script: pip_script:
- python2.7 -m ensurepip - python2.7 -m ensurepip
- python3.5 -m ensurepip - python3.5 -m ensurepip
...@@ -51,9 +51,12 @@ release_task: ...@@ -51,9 +51,12 @@ release_task:
#!/usr/bin/env bash #!/usr/bin/env bash
if [[ "$CIRRUS_RELEASE" == "" ]]; then if [[ "$CIRRUS_RELEASE" == "" ]]; then
echo "Not a release. No need to deploy!" CIRRUS_RELEASE=$(curl -sL https://api.github.com/repos/$CIRRUS_REPO_FULL_NAME/releases/tags/$CIRRUS_TAG | jq -r '.id')
if [[ "$CIRRUS_RELEASE" == "null" ]]; then
echo "Failed to find a release associated with this tag!"
exit 0 exit 0
fi fi
fi
if [[ "$GITHUB_TOKEN" == "" ]]; then if [[ "$GITHUB_TOKEN" == "" ]]; then
echo "Please provide GitHub access token via GITHUB_TOKEN environment variable!" echo "Please provide GitHub access token via GITHUB_TOKEN environment variable!"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment