Skip to content

Commit

Permalink
fix: incorrect codename when packaging (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
soulbird authored Jul 21, 2022
1 parent bdbd1b4 commit 578c20a
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions dockerfiles/Dockerfile.apisix-base.deb
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ FROM ${IMAGE_BASE}:${IMAGE_TAG} as prod

COPY --from=build /usr/local /usr/local
COPY --from=build /tmp/dist /tmp/dist
COPY --from=build /tmp/codename /tmp/codename
1 change: 1 addition & 0 deletions dockerfiles/Dockerfile.package.apisix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ ENV ARTIFACT=${ARTIFACT}

COPY --from=APISIX /tmp/build/output /tmp/build/output
COPY --from=APISIX /tmp/dist /tmp/dist
COPY --from=APISIX /tmp/codename /tmp/codename
COPY package-apisix.sh /package-apisix.sh
COPY usr /usr

Expand Down
1 change: 1 addition & 0 deletions dockerfiles/Dockerfile.package.apisix-base
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ ENV ARTIFACT=${ARTIFACT}

COPY --from=APISIX-BASE /usr/local/openresty /tmp/build/output/openresty
COPY --from=APISIX-BASE /tmp/dist /tmp/dist
COPY --from=APISIX-BASE /tmp/codename /tmp/codename
COPY package-apisix-base.sh /package-apisix-base.sh
COPY post-install-apisix-base.sh /post-install-apisix-base.sh
COPY usr /usr
Expand Down
1 change: 1 addition & 0 deletions dockerfiles/Dockerfile.package.apisix-dashboard
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ ENV ARTIFACT=${ARTIFACT}

COPY --from=APISIX /tmp/build/output /tmp/build/output
COPY --from=APISIX /tmp/dist /tmp/dist
COPY --from=APISIX /tmp/codename /tmp/codename
COPY package-apisix-dashboard.sh /package-apisix-dashboard.sh
COPY usr /usr

Expand Down
2 changes: 1 addition & 1 deletion package-apisix-base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -euo pipefail
set -x
mkdir /output
dist=$(cat /tmp/dist)
codename=$(cat /tmp/codename)

# Determine the name of artifact
# The defaut is apisix-base
Expand All @@ -17,7 +18,6 @@ openresty_zlib_version="1.2.12-1"
openresty_openssl111_version="1.1.1n-1"
openresty_pcre_version="8.45-1"
if [ "$PACKAGE_TYPE" == "deb" ]; then
codename=`cat /etc/os-release |grep VERSION_CODENAME|awk -F '=' '{print $2}'`
pkg_suffix="${codename}1"
openresty_zlib_version="$openresty_zlib_version~$pkg_suffix"
openresty_openssl111_version="$openresty_openssl111_version~$pkg_suffix"
Expand Down
2 changes: 2 additions & 0 deletions utils/determine-dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ then
fi

echo "${dist}" > /tmp/dist

echo `cat /etc/os-release |grep VERSION_CODENAME|awk -F '=' '{print $2}'` > /tmp/codename

0 comments on commit 578c20a

Please sign in to comment.