-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add shellscript * change image * update readme
- Loading branch information
Showing
3 changed files
with
57 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
set -eu | ||
|
||
readonly VERSION=$1 | ||
|
||
readonly BOLD=$'\x1b[1m' | ||
readonly GREEN=$'\x1b[32m' | ||
readonly RED=$'\x1b[31m' | ||
readonly RESET=$'\x1b[m' | ||
|
||
now() { | ||
date "+%Y/%m/%d %H:%M:%S" | ||
} | ||
|
||
info() { | ||
echo -e "[$(now)] ${GREEN}INFO${RESET}: $*" | ||
} | ||
|
||
err() { | ||
echo -e "[$(now)] ${RED}ERR${RESET}: $*" | ||
} | ||
|
||
if [[ ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then | ||
err "tag version (VERSION = $VERSION) is illegal. tag format must be 'v0.0.0'." | ||
exit 1 | ||
fi | ||
|
||
readonly TAG="docker-$VERSION" | ||
info "TAG = $TAG" | ||
git tag "$TAG" | ||
git push origin "$TAG" | ||
echo "" | ||
info "tagging successfully." | ||
info "see ${BOLD}https://hub.docker.com/r/jiro4989/build-deb-action${RESET} ." |