From 50ab261a4e7d07cfa036c9be31d76c704747f5e2 Mon Sep 17 00:00:00 2001 From: Thiago Silva Date: Mon, 23 May 2022 17:43:22 -0300 Subject: [PATCH] Better name for the RPM release variable --- .github/workflows/live_artifacts.yml | 2 +- ci/build-centos.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/live_artifacts.yml b/.github/workflows/live_artifacts.yml index 94af9500..bd429e6e 100644 --- a/.github/workflows/live_artifacts.yml +++ b/.github/workflows/live_artifacts.yml @@ -84,7 +84,7 @@ jobs: - name: Build Artifact run: | mkdir -p ${GITHUB_WORKSPACE}/artifacts - docker run -e LIVE=1 -e TAG=$TAG -e REPO_TO_BUILD=$REPO_TO_BUILD \ + docker run -e LIVE=1 -e TAG=$TAG -e REPO_TO_BUILD=$REPO_TO_BUILD -e RPM_RELEASE=1 \ -v ${GITHUB_WORKSPACE}:/workspace \ -v ${GITHUB_WORKSPACE}/artifacts:/root/rpmbuild \ nanocurrency/nano-env:centos /bin/bash -c "ci/build-centos.sh" diff --git a/ci/build-centos.sh b/ci/build-centos.sh index 37e5ebb7..117a7555 100755 --- a/ci/build-centos.sh +++ b/ci/build-centos.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash TAG=$(echo $TAG) VERSIONS=${TAG//V/} -RELEASE=$(echo $CI_JOB_ID) +RPM_RELEASE=$(echo $RPM_RELEASE) REPO_TO_BUILD=$(echo $REPO_TO_BUILD) run_source() { @@ -25,7 +25,7 @@ run_update() { echo "Updating \"${outfile}\"..." rm -f "${file}.new" - awk -v srch="@VERSION@" -v repl="$VERSIONS" -v srch2="@RELEASE@" -v repl2="$RELEASE" '{ sub(srch,repl,$0); sub(srch2,repl2, $0); print $0}' <${file} >${file}.new + awk -v srch="@VERSION@" -v repl="$VERSIONS" -v srch2="@RELEASE@" -v repl2="$RPM_RELEASE" '{ sub(srch,repl,$0); sub(srch2,repl2, $0); print $0}' <${file} >${file}.new rm -fr "${outfile}" cat "${file}.new" >"${outfile}" rm -f "${file}.new"