This is an automated email from the ASF dual-hosted git repository.

spacewander pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new 3422713  ci: fix the broken VERSION env (#5586)
3422713 is described below

commit 3422713b9cbbd106061b3dc584493c6c0e066e6f
Author: 罗泽轩 <[email protected]>
AuthorDate: Tue Nov 23 21:08:33 2021 +0800

    ci: fix the broken VERSION env (#5586)
---
 .github/workflows/build.yml | 2 +-
 Makefile                    | 8 +++++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 0ac7025..5de3073 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -69,7 +69,7 @@ jobs:
       - name: Create tarball
         if: ${{ startsWith(github.ref, 'refs/heads/release/') }}
         run: |
-          make compress-tar project_version=${{ 
steps.branch_env.outputs.version }}
+          make compress-tar VERSION=${{ steps.branch_env.outputs.version }}
 
       - name: Remove source code
         if: ${{ startsWith(github.ref, 'refs/heads/release/') }}
diff --git a/Makefile b/Makefile
index 9840514..cc83e7e 100644
--- a/Makefile
+++ b/Makefile
@@ -22,10 +22,10 @@ SHELL := /bin/bash -o pipefail
 
 
 # Project basic setting
+VERSION                ?= master
 project_name           ?= apache-apisix
-project_version        ?= master
 project_compose_ci     ?= ci/pod/docker-compose.yml
-project_release_name   ?= $(project_name)-$(project_version)-src
+project_release_name   ?= $(project_name)-$(VERSION)-src
 
 
 # Hyperconverged Infrastructure
@@ -368,11 +368,13 @@ release-src: compress-tar
 
 .PHONY: compress-tar
 compress-tar:
+       # The $VERSION can be major.minor.patch (from developer)
+       # or major.minor (from the branch name in the CI)
        $(ENV_TAR) -zcvf $(project_release_name).tgz \
        ./apisix \
        ./bin \
        ./conf \
-       ./rockspec/apisix-$(project_version)-*.rockspec \
+       ./rockspec/apisix-$(VERSION)*.rockspec \
        ./rockspec/apisix-master-0.rockspec \
        LICENSE \
        Makefile \

Reply via email to