From 1361b3950ffea2b2e83a6d4202827725131794f0 Mon Sep 17 00:00:00 2001 From: Jeong Han Lee Date: Sat, 26 Jun 2021 01:35:47 -0700 Subject: [PATCH] release v1.0.0 --- .github/workflows/centos7.yml | 2 +- .github/workflows/debian10.yml | 2 +- .github/workflows/rocky8.yml | 2 +- .github/workflows/sl7.yml | 2 +- release.bash | 50 ++++++++++++++++++++++++++++++++++ 5 files changed, 54 insertions(+), 4 deletions(-) create mode 100755 release.bash diff --git a/.github/workflows/centos7.yml b/.github/workflows/centos7.yml index 88f6aca..6caa6c8 100644 --- a/.github/workflows/centos7.yml +++ b/.github/workflows/centos7.yml @@ -20,7 +20,7 @@ jobs: DOCKER_FILE: centos7/Dockerfile DOCKER_ACCOUNT: alscontrols DOCKER_REPO: centos7-epics - DOCKER_TAG: latest + DOCKER_TAG: v1.0.0 steps: - diff --git a/.github/workflows/debian10.yml b/.github/workflows/debian10.yml index 0c7e6e2..743973f 100644 --- a/.github/workflows/debian10.yml +++ b/.github/workflows/debian10.yml @@ -20,7 +20,7 @@ jobs: DOCKER_FILE: debian10/Dockerfile DOCKER_ACCOUNT: alscontrols DOCKER_REPO: debian10-epics - DOCKER_TAG: latest + DOCKER_TAG: v1.0.0 steps: - diff --git a/.github/workflows/rocky8.yml b/.github/workflows/rocky8.yml index fbf50f2..c4976cc 100644 --- a/.github/workflows/rocky8.yml +++ b/.github/workflows/rocky8.yml @@ -20,7 +20,7 @@ jobs: DOCKER_FILE: rocky8/Dockerfile DOCKER_ACCOUNT: alscontrols DOCKER_REPO: rocky8-epics - DOCKER_TAG: latest + DOCKER_TAG: v1.0.0 steps: - diff --git a/.github/workflows/sl7.yml b/.github/workflows/sl7.yml index 55cfad3..c94abfc 100644 --- a/.github/workflows/sl7.yml +++ b/.github/workflows/sl7.yml @@ -21,7 +21,7 @@ jobs: DOCKER_FILE: sl7/Dockerfile DOCKER_ACCOUNT: alscontrols DOCKER_REPO: sl7-epics - DOCKER_TAG: latest + DOCKER_TAG: v1.0.0 steps: - diff --git a/release.bash b/release.bash new file mode 100755 index 0000000..a3333f3 --- /dev/null +++ b/release.bash @@ -0,0 +1,50 @@ +#!/usr/bin/env bash +# author : Jeong Han Lee +# email : jeonghan.lee@gmail.com +# version : 0.0.1 + +declare -g SC_SCRIPT; +declare -g SC_TOP; + +SC_SCRIPT="$(realpath "$0")"; +SC_TOP="${SC_SCRIPT%/*}" + +function pushd { builtin pushd "$@" > /dev/null || exit; } +function popd { builtin popd > /dev/null || exit; } + +Debian10="debian10.yml" +CentOS7="centos7.yml" +Rocky8="rocky8.yml" +Sl7="sl7.yml" + +ACTION_PATH="${SC_TOP}/.github/workflows"; +DEB_FILE="${ACTION_PATH}/${Debian10}"; +CEN_FILE="${ACTION_PATH}/${CentOS7}"; +ROC_FILE="${ACTION_PATH}/${Rocky8}"; +SL7_FILE="${ACTION_PATH}/${Sl7}"; + + +function replace_tag +{ + local tag="$1"; shift; + local file="$1"; shift; + sed -i -e "s| DOCKER_TAG:.*$| DOCKER_TAG: ${tag}|g" "${file}" +} + + +input_tag="$1"; + +if [ -z "$input_tag" ]; then + input_tag="latest"; + echo "Default tag [ $input_tag ] will be used." +fi + +pushd "$SC_TOP" || exit +replace_tag "${input_tag}" "${DEB_FILE}" +replace_tag "${input_tag}" "${CEN_FILE}" +replace_tag "${input_tag}" "${ROC_FILE}" +replace_tag "${input_tag}" "${SL7_FILE}" +popd || exit + +exit +