diff options
| author | Malf Furious <m@lfurio.us> | 2017-08-29 03:03:59 -0400 | 
|---|---|---|
| committer | Malf Furious <m@lfurio.us> | 2017-08-29 03:03:59 -0400 | 
| commit | 52cf1a3c3e8a0830816ed3d8b3648e112d0d97c2 (patch) | |
| tree | 1ce83b55ab155516798f1a3849f259637bc41905 | |
| parent | 43648695c2448edb926bedce59b7b5a37bc5802e (diff) | |
| download | systrunk-52cf1a3c3e8a0830816ed3d8b3648e112d0d97c2.tar.gz systrunk-52cf1a3c3e8a0830816ed3d8b3648e112d0d97c2.zip  | |
Add tag op
| -rw-r--r-- | main.sh | 2 | ||||
| -rw-r--r-- | repo-mutate.sh | 17 | 
2 files changed, 19 insertions, 0 deletions
@@ -34,6 +34,8 @@ function main          systr_status "$@"      elif [[ "$cmd" == "commit" ]]; then          systr_commit "$@" +    elif [[ "$cmd" == "tag" ]]; then +        systr_repo_tag "$@"      else          echo "Fatal: $1 not recognized"      fi diff --git a/repo-mutate.sh b/repo-mutate.sh index e35424f..f2f90dd 100644 --- a/repo-mutate.sh +++ b/repo-mutate.sh @@ -123,3 +123,20 @@ function systr_repo_set_reference          ssh "$remote" "systrunk set-ref \"$symref\" \"$commit\""      fi  } + +## +# systr_repo_tag <name> +# +# Tag the current commit.  This creates a new branch which references +# BASE. +## +function systr_repo_tag +{ +    if [ $# -lt 1 ]; then +        echo "Fatal: too few arguments to systr_repo_tag" +        exit 1 +    fi + +    name="$1" +    systr_repo_set_reference "$name" "$BASE" +}  | 
