Skip to content

Commit

Permalink
Filter CircleCI builds by both TAG and SHA1
Browse files Browse the repository at this point in the history
  • Loading branch information
majorz committed Oct 18, 2017
1 parent 8293d48 commit 2d230c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
This project adheres to [Semantic Versioning](http://semver.org/).

## v1.0.1 - 2017-10-18

* Filter CircleCI builds by both TAG and SHA1 [majorz]

## v1.0.0 - 2017-10-18

* Initial release [majorz]
2 changes: 1 addition & 1 deletion scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ main() {
local _build_nums

_builds=$(ensure circle "$CIRCLE_FULL_ENDPOINT")
_filter='.[] | select(.vcs_tag == "'$CIRCLE_TAG'" and .workflows.job_name != "deploy") | .build_num'
_filter='.[] | select(.vcs_tag == "'$CIRCLE_TAG'" and .vcs_revision == "'$CIRCLE_SHA1'" and .workflows.job_name != "deploy") | .build_num'
_build_nums=$(ensure jq "$_filter" <<< "$_builds")

if [ -z "$_build_nums" ]; then
Expand Down

0 comments on commit 2d230c0

Please sign in to comment.