update make file

This commit is contained in:
KaySar12 2024-10-04 12:20:45 +07:00
parent 7cf16e2bec
commit 7237251294
2 changed files with 7 additions and 7 deletions

2
.gitignore vendored
View File

@ -20,7 +20,7 @@ target/
dist/ dist/
__debug_bin __debug_bin
codegen/ codegen/
commit.txt
node_modules/ node_modules/
dist/ dist/
.idea .idea

View File

@ -14,7 +14,8 @@ PREV_TAG ?= $(shell git describe --tags --match '*.*.*' | sort -V | head -n2 | t
ARCHIVE_PATH=buildzip ARCHIVE_PATH=buildzip
PACKAGE_NAME=$(OS)-$(ARCHITECHTURE)-nextzenos-user-service-$(TAG) PACKAGE_NAME=$(OS)-$(ARCHITECHTURE)-nextzenos-user-service-$(TAG)
TAG_MESSAGE ?= "" TAG_MESSAGE ?= ""
GIT_COMMIT_MESSAGE ?="" GIT_MESSAGE_FILE := commit.txt
GIT_COMMIT_MESSAGE ?=$(shell cat ${file})
build_service: build_service:
$(GORELEASERBUILD) --clean --snapshot -f .goreleaser.debug.yaml --id $(SERVICE)-$(ARCHITECHTURE) $(GORELEASERBUILD) --clean --snapshot -f .goreleaser.debug.yaml --id $(SERVICE)-$(ARCHITECHTURE)
@ -30,8 +31,7 @@ remove_package:
clear_archive: clear_archive:
@rm -rf $(CUR_DIR)/$(ARCHIVE_PATH) @rm -rf $(CUR_DIR)/$(ARCHIVE_PATH)
#make create_tag CUR_TAG=x.x TAG_MESSAGE="this is tag message" #make create_tag CUR_TAG=x.x TAG_MESSAGE="this is tag message"
create_tag: create_tag:push_git
@${GIT} push ${GIT_REMOTE}
@${GIT} tag -a ${CUR_TAG} -m "${TAG_MESSAGE}" || { echo "Failed to create tag"; exit 1; } @${GIT} tag -a ${CUR_TAG} -m "${TAG_MESSAGE}" || { echo "Failed to create tag"; exit 1; }
@${GIT} push ${GIT_REMOTE} ${CUR_TAG} || { echo "Failed to push tag"; exit 1; } @${GIT} push ${GIT_REMOTE} ${CUR_TAG} || { echo "Failed to push tag"; exit 1; }
#make remove_tag CUR_TAG=x.x #make remove_tag CUR_TAG=x.x
@ -41,11 +41,11 @@ remove_tag:
check_tag: check_tag:
@echo "Previous tag: $(PREV_TAG)"; @echo "Previous tag: $(PREV_TAG)";
@echo "Current tag: $(CUR_TAG)"; @echo "Current tag: $(CUR_TAG)";
push_release_all: push_release_all:push_git
${GORELEASER} release --clean -f .goreleaser.yaml ${GORELEASER} release --clean -f .goreleaser.yaml
push_release: push_release:push_git
${GORELEASER} release --single-target ${GORELEASER} release --single-target
push_commit: push_git:
@${GIT} pull ${GIT_REMOTE} @${GIT} pull ${GIT_REMOTE}
@${GIT} add . @${GIT} add .
@${GIT} commit -m "${GIT_COMMIT_MESSAGE}" @${GIT} commit -m "${GIT_COMMIT_MESSAGE}"