Skip to content

Commit

Permalink
chore: Refactor Makefile targets and dependencies
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
actions-user committed Jun 29, 2024
1 parent 3553040 commit ec6b23d
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,22 @@ run:
build:
docker compose build backstage

publish: login-github
publish: login-github version
docker compose build --push backstage
VERSION=latest docker compose build --push backstage

version:
@echo "$(VERSION)"
ifdef CI
@echo "# 📦 Version" >> ${GITHUB_STEP_SUMMARY}
@echo "Copy the following version to the \`VERSION\` variable as the Docker image tag." >> ${GITHUB_STEP_SUMMARY}
@echo "\`\`\`" >> ${GITHUB_STEP_SUMMARY}
@echo "${VERSION}" >> ${GITHUB_STEP_SUMMARY}
@echo "\`\`\`" >> ${GITHUB_STEP_SUMMARY}
@echo "" >> ${GITHUB_STEP_SUMMARY}
endif

release:
release: version
ifdef CI
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
Expand All @@ -82,14 +90,6 @@ endif
--title "${VERSION}" \
--generate-notes \
--target main
ifdef CI
@echo "# Version" >> ${GITHUB_STEP_SUMMARY}
@echo "Copy the following version to the \`VERSION\` variable as the Docker image tag." >> ${GITHUB_STEP_SUMMARY}
@echo "\`\`\`" >> ${GITHUB_STEP_SUMMARY}
@echo "${VERSION}" >> ${GITHUB_STEP_SUMMARY}
@echo "\`\`\`" >> ${GITHUB_STEP_SUMMARY}
@echo "" >> ${GITHUB_STEP_SUMMARY}
endif

undo-release:
git tag -d ${VERSION}
Expand Down

0 comments on commit ec6b23d

Please sign in to comment.