Skip to content

Commit c360962

Browse files
committed
Makefile: tag target improved - check for unpushed changes in current branch only
1 parent 5e9682e commit c360962

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,15 +200,15 @@ rpmrepo: rpm
200200
gpg -a --export $(KEY) > repodata/repomd.xml.key
201201

202202
tag:
203-
git pull --rebase --ff-only
204-
if [ -n "$$(git status --porcelain)" ]; then \
203+
@git pull --rebase --ff-only
204+
@if [ -n "$$(git status --porcelain)" ]; then \
205205
echo "uncommited changes"; \
206206
git status --porcelain; \
207207
false; \
208208
fi
209-
if [ -n "$$(git log --oneline --branches --not --remotes)" ]; then \
209+
@if [ -n "$$(git log --branches --source --not --remotes --no-walk --oneline | awk '{print $2}' | grep \"$$(git branch --show-current)\")" ]; then \
210210
echo "unpushed changes"; \
211-
git log --oneline --branches --not --remotes ; \
211+
git log --branches --source --not --remotes --no-walk --oneline; \
212212
false; \
213213
fi
214214
git tag -a "release-$(HIYAPYCOVERSION)" -m "version $(HIYAPYCOVERSION) released on $$(date -R)"

0 commit comments

Comments
 (0)