Skip to content

Commit

Permalink
Update release command to address revision date and hash (#640)
Browse files Browse the repository at this point in the history
  • Loading branch information
desyncr authored Jan 3, 2018
1 parent ff391b5 commit 71612ef
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
13 changes: 9 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ build:
@echo "-antigen-env-setup" >> ${TARGET}
@echo "${VERSION}" > ${VERSION_FILE}
@$(call ised,"s/{{ANTIGEN_VERSION}}/$$(cat ${VERSION_FILE})/",${TARGET})
@$(call ised,"s/{{ANTIGEN_REVISION}}/$$(git log -n1 --format=%h -- . ':(exclude)bin')/",${TARGET})
@$(call ised,"s/{{ANTIGEN_REVISION_DATE}}/$$(TZ=UTC date -d @$$(git log -n1 --format='%at' -- . ':(exclude)bin') '+%F %T %z')/",${TARGET})
@$(call ised,"s/{{ANTIGEN_REVISION}}/$$(git log -n1 --format=%h -- src)/",${TARGET})
@$(call ised,"s/{{ANTIGEN_REVISION_DATE}}/$$(git log -n1 --format='%ai' -- src)/",${TARGET})
ifeq (${WITH_DEBUG}, no)
@$(call isede,"s/ (WARN|LOG|ERR|TRACE) .*&//",${TARGET})
@$(call isede,"/ (WARN|LOG|ERR|TRACE) .*/d",${TARGET})
Expand All @@ -113,13 +113,18 @@ endif
@ls -sh ${TARGET}
release:
# Move to release branch
git checkout develop
${MAKE} build tests
git checkout -b release/${VERSION}
# Run build and tests
${MAKE} build tests
# Update changelog
${EDITOR} CHANGELOG.md
# Build release commit
git add CHANGELOG.md ${VERSION_FILE} README.mkd ${TARGET}
git add CHANGELOG.md README.mkd ${VERSION_FILE}
git commit -S -m "Update changelog for ${VERSION}"
# Update binary artifact
git add ${TARGET}
git commit -S -m "Build release ${VERSION}"
publish:
Expand Down
13 changes: 9 additions & 4 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ build:
@echo "-antigen-env-setup" >> ${TARGET}
@echo "${VERSION}" > ${VERSION_FILE}
@$(call ised,"s/{{ANTIGEN_VERSION}}/$$(cat ${VERSION_FILE})/",${TARGET})
@$(call ised,"s/{{ANTIGEN_REVISION}}/$$(git log -n1 --format=%h -- . ':(exclude)bin')/",${TARGET})
@$(call ised,"s/{{ANTIGEN_REVISION_DATE}}/$$(TZ=UTC date -d @$$(git log -n1 --format='%at' -- . ':(exclude)bin') '+%F %T %z')/",${TARGET})
@$(call ised,"s/{{ANTIGEN_REVISION}}/$$(git log -n1 --format=%h -- src)/",${TARGET})
@$(call ised,"s/{{ANTIGEN_REVISION_DATE}}/$$(git log -n1 --format='%ai' -- src)/",${TARGET})
ifeq (${WITH_DEBUG}, no)
@$(call isede,"s/ (WARN|LOG|ERR|TRACE) .*&//",${TARGET})
@$(call isede,"/ (WARN|LOG|ERR|TRACE) .*/d",${TARGET})
Expand All @@ -101,13 +101,18 @@ endif
@ls -sh ${TARGET}
release:
# Move to release branch
git checkout develop
${MAKE} build tests
git checkout -b release/${VERSION}
# Run build and tests
${MAKE} build tests
# Update changelog
${EDITOR} CHANGELOG.md
# Build release commit
git add CHANGELOG.md ${VERSION_FILE} README.mkd ${TARGET}
git add CHANGELOG.md README.mkd ${VERSION_FILE}
git commit -S -m "Update changelog for ${VERSION}"
# Update binary artifact
git add ${TARGET}
git commit -S -m "Build release ${VERSION}"
publish:
Expand Down
2 changes: 1 addition & 1 deletion bin/antigen.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -1385,7 +1385,7 @@ antigen-use () {
antigen-version () {
local extensions

printf "Antigen %s (%s)\nRevision date: %s\n" "develop" "6aa7016" "2017-12-31 03:20:22 +0000"
printf "Antigen %s (%s)\nRevision date: %s\n" "develop" "ff391b5" "2018-01-02 13:19:57 +0100"

# Show extension information if any is available
if (( $+functions[antigen-ext] )); then
Expand Down

0 comments on commit 71612ef

Please sign in to comment.