Permalink
Browse files

enhancements to get_revision

* allow specifying an optional point-release when generating a revision
* create a command-line tool to call it
  • Loading branch information...
RangerRick committed Nov 30, 2017
1 parent 36be64c commit 04e5eeafe3d58461873c479158b04bea81c735a1
Showing with 14 additions and 1 deletion.
  1. +9 −0 generate-revision.sh
  2. +5 −1 lib/bamboo.sh
@@ -0,0 +1,9 @@
#!/bin/bash
MYDIR=$(dirname "$0")
MYDIR=$(cd "$MYDIR" || exit 1; pwd)
# shellcheck source=lib.sh
. "${MYDIR}/lib.sh"
generate_revision "${WORKDIR}" "$@"
@@ -29,9 +29,13 @@ get_branch_name() {
generate_revision() {
local _workdir
_workdir="$1"; shift
_point=1
if [ "$#" -gt 0 ]; then
_point="$1"; shift
fi
DATESTAMP="$(get_git_date "${_workdir}")"
echo "0.${DATESTAMP}.1";
echo "0.${DATESTAMP}.${_point}";
}
set +euo pipefail

0 comments on commit 04e5eea

Please sign in to comment.