Skip to content

Commit 11bdbd5

Browse files
committed
refactor: simplify version bumping in files
1 parent 9b85089 commit 11bdbd5

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

Makefile

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
VERSION ?= 6.2.2
2-
WORKFLOW_FILES := .github/workflows/build.yml .github/workflows/promote.yml .github/workflows/release.yml
2+
WORKFLOW_FOLDER := .github/workflows
33
ifneq (,$(findstring xterm,${TERM}))
44
RED := $(shell tput -Txterm setaf 1)
55
GREEN := $(shell tput -Txterm setaf 2)
@@ -18,17 +18,9 @@ endif
1818
release-version:
1919
@echo -e "${LIGHTPURPLE}+ make target: $@${RESET}"
2020
sed -i \
21-
-e 's%getdevopspro/github-actions/version-file@v.*%getdevopspro/github-actions/version-file@v$(VERSION)%g' \
22-
-e 's%getdevopspro/github-actions/command@v.*%getdevopspro/github-actions/command@v$(VERSION)%g' \
23-
-e 's%getdevopspro/github-actions/buildx-bake@v.*%getdevopspro/github-actions/buildx-bake@v$(VERSION)%g' \
24-
-e 's%getdevopspro/github-actions/buildx-bake/prepare@v.*%getdevopspro/github-actions/buildx-bake/prepare@v$(VERSION)%g' \
25-
-e 's%getdevopspro/github-actions/buildx-bake/build@v.*%getdevopspro/github-actions/buildx-bake/build@v$(VERSION)%g' \
26-
-e 's%getdevopspro/github-actions/buildx-bake/merge@v.*%getdevopspro/github-actions/buildx-bake/merge@v$(VERSION)%g' \
27-
-e 's%getdevopspro/github-actions/buildx-bake/promote@v.*%getdevopspro/github-actions/buildx-bake/promote@v$(VERSION)%g' \
28-
-e 's%getdevopspro/github-actions/release-version@v.*%getdevopspro/github-actions/release-version@v$(VERSION)%g' \
29-
-e 's%getdevopspro/github-actions/release-git-push@v.*%getdevopspro/github-actions/release-git-push@v$(VERSION)%g' \
30-
$(WORKFLOW_FILES)
31-
git add $(WORKFLOW_FILES)
21+
-e 's%\(getdevopspro/github-actions[^@]*\)@v[^[:space:]]*%\1@v$(VERSION)%g' \
22+
$(WORKFLOW_FOLDER)/*.y*ml
23+
git add $(WORKFLOW_FOLDER)
3224

3325
promote: release-version
3426
@echo -e "${LIGHTPURPLE}+ make target: $@${RESET}"

0 commit comments

Comments
 (0)