From 94cb22a859078285e031f9e87747501fdea4d754 Mon Sep 17 00:00:00 2001 From: hamzabessa Date: Mon, 8 Jan 2024 14:58:12 +0100 Subject: [PATCH] fix: version --- .github/actions/package-nfpm/action.yml | 11 ++++------- .github/workflows/stream-connectors-dependencies.yml | 1 + dependencies/lua-cffi/packaging/lua-cffi.yaml | 2 +- dependencies/lua-curl/packaging/lua-curl.yaml | 2 +- dependencies/lua-tz/packaging/lua-tz.yaml | 2 +- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/actions/package-nfpm/action.yml b/.github/actions/package-nfpm/action.yml index 5a821889..50890cbb 100644 --- a/.github/actions/package-nfpm/action.yml +++ b/.github/actions/package-nfpm/action.yml @@ -10,11 +10,8 @@ inputs: distrib: description: The package distrib required: true - major_version: - description: The major version - required: false - minor_version: - description: The minor version + version: + description: The version required: false release: description: The package release number @@ -68,17 +65,17 @@ runs: exit 1 fi + export VERSION="${{ inputs.version }}" export RPM_SIGNING_KEY_FILE="$(pwd)/key.gpg" export RPM_SIGNING_KEY_ID="$RPM_GPG_SIGNING_KEY_ID" export NFPM_RPM_PASSPHRASE="$RPM_GPG_SIGNING_PASSPHRASE" echo "Current directory: $(pwd)" - version=`date '+%Y%m%d'` + for FILE in ${{ inputs.nfpm_file_pattern }}; do DIRNAME=$(dirname $FILE) BASENAME=$(basename $FILE) cd $DIRNAME sed -i "s/@luaver@/$luaver/g" $BASENAME - sed -i "s/@VERSION@/$version/g" $BASENAME sed -i "s/@COMMIT_HASH@/${{ inputs.commit_hash }}/g" $BASENAME nfpm package --config $BASENAME --packager ${{ inputs.package_extension }} cd - diff --git a/.github/workflows/stream-connectors-dependencies.yml b/.github/workflows/stream-connectors-dependencies.yml index c853d3d2..3caecaa9 100644 --- a/.github/workflows/stream-connectors-dependencies.yml +++ b/.github/workflows/stream-connectors-dependencies.yml @@ -160,6 +160,7 @@ jobs: distrib: ${{ matrix.distrib }} package_extension: ${{ matrix.package_extension }} arch: all + version: "`date '+%Y%m%d'`" commit_hash: ${{ github.sha }} cache_key: ${{ github.sha }}-${{ github.run_id }}-${{ matrix.package_extension }}-${{ matrix.distrib }} rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }} diff --git a/dependencies/lua-cffi/packaging/lua-cffi.yaml b/dependencies/lua-cffi/packaging/lua-cffi.yaml index 7b08fef2..f1b8eafb 100644 --- a/dependencies/lua-cffi/packaging/lua-cffi.yaml +++ b/dependencies/lua-cffi/packaging/lua-cffi.yaml @@ -2,7 +2,7 @@ name: "lua-cffi" arch: "${ARCH}" platform: "linux" version_schema: "none" -version: "@VERSION@" +version: "${VERSION}" release: "1${DIST}" section: "default" priority: "optional" diff --git a/dependencies/lua-curl/packaging/lua-curl.yaml b/dependencies/lua-curl/packaging/lua-curl.yaml index f7d4721f..3273ba46 100644 --- a/dependencies/lua-curl/packaging/lua-curl.yaml +++ b/dependencies/lua-curl/packaging/lua-curl.yaml @@ -2,7 +2,7 @@ name: "lua-curl" arch: "${ARCH}" platform: "linux" version_schema: "none" -version: "@VERSION@" +version: "${VERSION}" release: "5${DIST}" section: "default" priority: "optional" diff --git a/dependencies/lua-tz/packaging/lua-tz.yaml b/dependencies/lua-tz/packaging/lua-tz.yaml index eff1f964..68026ee3 100644 --- a/dependencies/lua-tz/packaging/lua-tz.yaml +++ b/dependencies/lua-tz/packaging/lua-tz.yaml @@ -2,7 +2,7 @@ name: "lua-tz" arch: "${ARCH}" platform: "linux" version_schema: "none" -version: "@VERSION@" +version: "${VERSION}" release: "1${DIST}" section: "default" priority: "optional"