Files
myscripts/git-build.sh
2019-02-21 21:29:20 +01:00

7 lines
207 B
Bash
Executable File

#!/bin/sh
ORIGIN_NAME=$(git symbolic-ref HEAD | sed 's!refs\/heads\/!!'| sed 's!build\/!!')
BUILD_DATE=$(date --utc)
git checkout -B "build/$ORIGIN_NAME"
git add --all
git commit -m "build from $BUILD_DATE"