Skip to content

Commit 578c20a

Browse files
authored
fix: incorrect codename when packaging (#225)
1 parent bdbd1b4 commit 578c20a

File tree

6 files changed

+7
-1
lines changed

6 files changed

+7
-1
lines changed

dockerfiles/Dockerfile.apisix-base.deb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ FROM ${IMAGE_BASE}:${IMAGE_TAG} as prod
2727

2828
COPY --from=build /usr/local /usr/local
2929
COPY --from=build /tmp/dist /tmp/dist
30+
COPY --from=build /tmp/codename /tmp/codename

dockerfiles/Dockerfile.package.apisix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ ENV ARTIFACT=${ARTIFACT}
1818

1919
COPY --from=APISIX /tmp/build/output /tmp/build/output
2020
COPY --from=APISIX /tmp/dist /tmp/dist
21+
COPY --from=APISIX /tmp/codename /tmp/codename
2122
COPY package-apisix.sh /package-apisix.sh
2223
COPY usr /usr
2324

dockerfiles/Dockerfile.package.apisix-base

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ ENV ARTIFACT=${ARTIFACT}
1616

1717
COPY --from=APISIX-BASE /usr/local/openresty /tmp/build/output/openresty
1818
COPY --from=APISIX-BASE /tmp/dist /tmp/dist
19+
COPY --from=APISIX-BASE /tmp/codename /tmp/codename
1920
COPY package-apisix-base.sh /package-apisix-base.sh
2021
COPY post-install-apisix-base.sh /post-install-apisix-base.sh
2122
COPY usr /usr

dockerfiles/Dockerfile.package.apisix-dashboard

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ ENV ARTIFACT=${ARTIFACT}
1616

1717
COPY --from=APISIX /tmp/build/output /tmp/build/output
1818
COPY --from=APISIX /tmp/dist /tmp/dist
19+
COPY --from=APISIX /tmp/codename /tmp/codename
1920
COPY package-apisix-dashboard.sh /package-apisix-dashboard.sh
2021
COPY usr /usr
2122

package-apisix-base.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ set -euo pipefail
33
set -x
44
mkdir /output
55
dist=$(cat /tmp/dist)
6+
codename=$(cat /tmp/codename)
67

78
# Determine the name of artifact
89
# The defaut is apisix-base
@@ -17,7 +18,6 @@ openresty_zlib_version="1.2.12-1"
1718
openresty_openssl111_version="1.1.1n-1"
1819
openresty_pcre_version="8.45-1"
1920
if [ "$PACKAGE_TYPE" == "deb" ]; then
20-
codename=`cat /etc/os-release |grep VERSION_CODENAME|awk -F '=' '{print $2}'`
2121
pkg_suffix="${codename}1"
2222
openresty_zlib_version="$openresty_zlib_version~$pkg_suffix"
2323
openresty_openssl111_version="$openresty_openssl111_version~$pkg_suffix"

utils/determine-dist.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ then
1515
fi
1616

1717
echo "${dist}" > /tmp/dist
18+
19+
echo `cat /etc/os-release |grep VERSION_CODENAME|awk -F '=' '{print $2}'` > /tmp/codename

0 commit comments

Comments
 (0)