Skip to content

Commit 766649a

Browse files
committed
add git_tag
1 parent ee74eaf commit 766649a

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

make.sh

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
#!/usr/bin/env bash
22

3+
4+
# Setup
35
set -uexo pipefail
46
which greadlink >/dev/null 2>/dev/null && readlink=greadlink || readlink=readlink
57
rundir=$($readlink -f "${0%/*}")
68
cd "$rundir"
79

10+
11+
# Command to run
12+
813
ARG=${1:-build-proxy}
914

15+
16+
# Properties
17+
1018
SCOPE="deployable"
1119
NAME="debian-build"
1220
SCOPE_NAME="${SCOPE}/${NAME}"
@@ -16,6 +24,8 @@ PROXY="http://10.8.8.8:3142"
1624
BUILD_ARGS=""
1725

1826

27+
# Commands
28+
1929
pull(){
2030
docker pull "${IMAGE}"
2131
}
@@ -39,6 +49,16 @@ proxy(){
3949
echo "set BUILD_ARGS: ${BUILD_ARGS}"
4050
}
4151

52+
git_tag(){
53+
git tag -f $(date +%Y%m%d) && git push -f --tags
54+
}
55+
56+
clean(){
57+
docker rmi ${SCOPE_NAME}
58+
}
59+
60+
61+
# Orchestration
4262

4363
pull-build(){
4464
pull
@@ -63,9 +83,8 @@ build-au-proxy(){
6383
pull-build
6484
}
6585

66-
clean(){
67-
docker rmi ${SCOPE_NAME}
68-
}
86+
87+
# Runit
6988

7089
$ARG
7190

0 commit comments

Comments
 (0)