File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ MAKEFLAGS += --silent
22SHELL = /usr/bin/env bash
33
44_IMAGE_NAME = duolingo/pre-commit-hooks
5+ _LATEST_TAG = $(shell git tag | sort -V | tail -1)
56
67# Bumps this project's version number. Example: make release V=1.0.3
78.PHONY : release
@@ -14,7 +15,7 @@ release: test
1415 # Update source files and commit
1516 echo 'Creating release commit...'
1617 git grep --cached -z -l '' | xargs -0 sed -E -i '' -e \
17- "s@( rev: | entry: $(_IMAGE_NAME):)$$(git tag | sort -V | tail -1 )@\1${V}@g"
18+ "s@( rev: | entry: $(_IMAGE_NAME):)$(_LATEST_TAG )@\1${V}@g"
1819 git add -A
1920 git commit -m "Release ${V}" -n
2021
@@ -35,7 +36,7 @@ push: test
3536 # https://stackoverflow.com/a/69987949
3637 docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
3738 docker buildx build --push --platform linux/amd64,linux/arm64 \
38- -t " $( _IMAGE_NAME) :$$ (git tag | tail -1 )" \
39+ -t " $( _IMAGE_NAME) :$( _LATEST_TAG ) " \
3940 -t " $( _IMAGE_NAME) :latest" \
4041 .
4142
You can’t perform that action at this time.
0 commit comments