Skip to content

Commit

Permalink
update the latest file if the build is a tag build (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmarkley authored Oct 16, 2019
1 parent c028257 commit b953859
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions ci/upload.Linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ _log "Uploading build/${OUTPUT_HASH_FILE} to ${ARTIFACT_BASES3}/Linux/"
aws s3 cp build/"${OUTPUT_HASH_FILE}" "${ARTIFACT_BASES3}"/Linux/ --acl public-read --content-type text/plain --content-disposition attachment || _die "Failed uploading hash file."

GIT_BRANCH=$("${BASEPATH}"/ci/branch.sh) || _die "Failed resolving branch."
if [ "${GIT_BRANCH}" != "master" ]; then
_log "This is not a master build, so we won't update the latest file."
echo "${GIT_BRANCH}" | egrep -i 'master|tag:' >/dev/null
GIT_BRANCH_MATCH=${?}
if [ "${GIT_BRANCH_MATCH}" -ne 0 ]; then
_log "This does not appear to be either a master or tag build, so we won't update the latest file."
exit 0
fi

Expand Down
6 changes: 4 additions & 2 deletions ci/upload.Windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ _log "Uploading build/${OUTPUT_HASH_FILE} to ${ARTIFACT_BASES3}/Windows/"
aws s3 cp build/"${OUTPUT_HASH_FILE}" "${ARTIFACT_BASES3}"/Windows/ --acl public-read --content-type text/plain --content-disposition attachment || _die "Failed uploading hash file."

GIT_BRANCH=$("${BASEPATH}"/ci/branch.sh) || _die "Failed resolving branch."
if [ "${GIT_BRANCH}" != "master" ]; then
_log "This is not a master build, so we won't update the latest file."
echo "${GIT_BRANCH}" | egrep -i 'master|tag:' >/dev/null
GIT_BRANCH_MATCH=${?}
if [ "${GIT_BRANCH_MATCH}" -ne 0 ]; then
_log "This does not appear to be either a master or tag build, so we won't update the latest file."
exit 0
fi

Expand Down

0 comments on commit b953859

Please sign in to comment.