From 569be8ebdcf327b6fc4d73cbb2a68dc85a8c7940 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Wed, 7 Feb 2024 14:20:31 -0700 Subject: [PATCH] Revert Dockerfiles back to their original but update get_branch_name.sh to also strip off refs/tags/ --- .github/jobs/get_branch_name.sh | 1 + internal/scripts/docker/Dockerfile | 2 +- internal/scripts/docker/Dockerfile.copy | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/jobs/get_branch_name.sh b/.github/jobs/get_branch_name.sh index 82a1ee9a84..817b21faa4 100755 --- a/.github/jobs/get_branch_name.sh +++ b/.github/jobs/get_branch_name.sh @@ -10,6 +10,7 @@ else fi branch_name=${branch_name#"refs/heads/"} +branch_name=${branch_name#"refs/tags/"} echo "branch_name=${branch_name}" >> $GITHUB_OUTPUT echo branch_name: $branch_name diff --git a/internal/scripts/docker/Dockerfile b/internal/scripts/docker/Dockerfile index d2acbed3f6..c5daf58492 100644 --- a/internal/scripts/docker/Dockerfile +++ b/internal/scripts/docker/Dockerfile @@ -19,7 +19,7 @@ RUN if [ "x${SOURCE_BRANCH}" = "x" ]; then \ echo "Build Argument SOURCE_BRANCH=${SOURCE_BRANCH}"; \ fi -ENV MET_GIT_NAME $(echo ${SOURCE_BRANCH} | sed 's%/%_%g') +ENV MET_GIT_NAME ${SOURCE_BRANCH} ENV MET_REPO_DIR /met/MET-${MET_GIT_NAME} ENV MET_GIT_URL https://github.com/dtcenter/MET ENV MET_DEVELOPMENT true diff --git a/internal/scripts/docker/Dockerfile.copy b/internal/scripts/docker/Dockerfile.copy index 59941a5f03..4d3d9476cd 100644 --- a/internal/scripts/docker/Dockerfile.copy +++ b/internal/scripts/docker/Dockerfile.copy @@ -19,7 +19,7 @@ RUN if [ "x${SOURCE_BRANCH}" = "x" ]; then \ echo "Build Argument SOURCE_BRANCH=${SOURCE_BRANCH}"; \ fi -ENV MET_GIT_NAME $(echo ${SOURCE_BRANCH} | sed 's%/%_%g') +ENV MET_GIT_NAME ${SOURCE_BRANCH} ENV MET_REPO_DIR /met/MET-${MET_GIT_NAME} ENV MET_GIT_URL https://github.com/dtcenter/MET ENV MET_DEVELOPMENT true