From: Don Zickus <dzickus@xxxxxxxxxx> This is a target that will create the rawhide branch, ark-latest. It is mostly copied from the gitlab-ci.yml and turned into a Makefile target for easier understanding and execution. An optimization is to move some of the duplicate code to git-tree-check and replace git-status with git-diff-index to make it easier to detect a dirty tree. This target will be called by the maintainer and the gitlab-ci.yml file. Currently unused. No noticable changes. Signed-off-by: Don Zickus <dzickus@xxxxxxxxxx> --- redhat/Makefile | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/redhat/Makefile b/redhat/Makefile index 3056559dd0c1..a035eb257375 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -315,18 +315,20 @@ dist-release: dist-clean-sources dist-release-tag: @git tag -a -m "$(PACKAGE_NAME)-$(STAMP_VERSION)-$(PKGRELEASE)" $(PACKAGE_NAME)-$(STAMP_VERSION)-$(PKGRELEASE) -DIST_BRANCH ?= "os-build" -dist-merge-upstream: +git-tree-check: @if test -n "$(DIST_PUSH)" && test -z "$(shell git remote get-url gitlab 2>/dev/null)"; then \ echo -e "Please run 'git remote add gitlab <url>' to enable git-push.\n"; \ exit 1; \ fi + @git diff-index --quiet HEAD || \ + { echo -e "Dirty tree, please clean before merging.\n"; exit 1; } + +DIST_BRANCH ?= "os-build" +dist-merge-upstream: git-tree-check @if test "$(shell git branch --show-current)" != "$(DIST_BRANCH)"; then \ echo -e "Please checkout $(DIST_BRANCH) branch before merging.\n"; \ exit 1; \ fi; - @(shell git --no-optional-locks status -uno --porcelain 2>/dev/null || \ - { echo -e "Dirty tree, please clean before merging.\n"; exit 1; }) @# If TAG is empty, script defaults to master:HEAD @$(REDHAT)/scripts/ci/ark-rebase-patches.sh $(TAG) || exit 1 @@ -335,7 +337,14 @@ dist-merge-upstream: dist-merge-upstream-push: DIST_PUSH="1" dist-merge-upstream-push: dist-merge-upstream +dist-fedora-release: git-tree-check + + @# If TAG is empty, script defaults to master:HEAD + @cd ..; $(REDHAT)/scripts/ci/ark-create-release.sh $(TAG) || \ + (echo "Unable to create release tag"; exit 1) +dist-fedora-release-push: DIST_PUSH="1" +dist-fedora-release-push: dist-fedora-release .PHONY: dist-brew dist-koji dist-brew : BUILD_FLAGS ?= $(BREW_FLAGS) $(TEST_FLAGS) -- GitLab _______________________________________________ kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx