Skip to content

Commit

Permalink
fix: version setting in makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
piontec committed Dec 3, 2024
1 parent 4d36af4 commit f7a3e51
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Makefile.abs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ __check_defined = \

all: docker-build

release: release_ver_to_code docker-build-no-version docker-test
echo "build_ver = \"${TAG}\"" > app_build_suite/version.py
release: docker-test release_ver_to_code
git add --force app_build_suite/version.py
git add dabs.sh
git add dabs.sh setup.py
git commit -m "Release ${TAG}" --no-verify
git tag ${TAG}
docker build . -t ${IMG}:latest -t ${IMG}:${TAG}
mv dabs.sh.back dabs.sh
echo "build_ver = \"${TAG}-dev\"" > app_build_suite/version.py
git add dabs.sh
Expand All @@ -33,10 +33,11 @@ release: release_ver_to_code docker-build-no-version docker-test

release_ver_to_code:
$(call check_defined, TAG)
sed -i 's/version\=".*"/version\="'${TAG}'"/' setup.py
echo "build_ver = \"${TAG}\"" > app_build_suite/version.py
$(eval IMG_VER := ${TAG})
cp dabs.sh dabs.sh.back
TAG=${TAG} bash -c 'sed -i "s/:-\".*\"/:-\"$${TAG#v}\"/" dabs.sh'
sed -i "s/:-\".*\"/:-\"$${TAG#v}\"/" dabs.sh

# Build the docker image from locally built binary
docker-build-no-version:
Expand Down

0 comments on commit f7a3e51

Please sign in to comment.