Skip to content

Commit ec6b23d

Browse files
committed
chore: Refactor Makefile targets and dependencies
- Update Makefile to include new dependencies for `publish` target - Add conditional checks for CI in `version` target - Refactor `release` target to handle version dependency and CI condition
1 parent 3553040 commit ec6b23d

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Makefile

+10-10
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,22 @@ run:
6464
build:
6565
docker compose build backstage
6666

67-
publish: login-github
67+
publish: login-github version
6868
docker compose build --push backstage
6969
VERSION=latest docker compose build --push backstage
7070

7171
version:
7272
@echo "$(VERSION)"
73+
ifdef CI
74+
@echo "# 📦 Version" >> ${GITHUB_STEP_SUMMARY}
75+
@echo "Copy the following version to the \`VERSION\` variable as the Docker image tag." >> ${GITHUB_STEP_SUMMARY}
76+
@echo "\`\`\`" >> ${GITHUB_STEP_SUMMARY}
77+
@echo "${VERSION}" >> ${GITHUB_STEP_SUMMARY}
78+
@echo "\`\`\`" >> ${GITHUB_STEP_SUMMARY}
79+
@echo "" >> ${GITHUB_STEP_SUMMARY}
80+
endif
7381

74-
release:
82+
release: version
7583
ifdef CI
7684
git config --global user.email "[email protected]"
7785
git config --global user.name "GitHub Actions"
@@ -82,14 +90,6 @@ endif
8290
--title "${VERSION}" \
8391
--generate-notes \
8492
--target main
85-
ifdef CI
86-
@echo "# Version" >> ${GITHUB_STEP_SUMMARY}
87-
@echo "Copy the following version to the \`VERSION\` variable as the Docker image tag." >> ${GITHUB_STEP_SUMMARY}
88-
@echo "\`\`\`" >> ${GITHUB_STEP_SUMMARY}
89-
@echo "${VERSION}" >> ${GITHUB_STEP_SUMMARY}
90-
@echo "\`\`\`" >> ${GITHUB_STEP_SUMMARY}
91-
@echo "" >> ${GITHUB_STEP_SUMMARY}
92-
endif
9393

9494
undo-release:
9595
git tag -d ${VERSION}

0 commit comments

Comments
 (0)