mirror of
https://github.com/clearlinux/common.git
synced 2026-10-03 23:38:20 +00:00
koji: only pull --rebase if remote is initialized
After running 'make autospecnew', the freshly created repo only exists locally, so the repo remote is not yet initialized. The 'git pull --rebase' (via 'make koji') will then fail due to the uninitialized remote. Improve this case by only rebasing when the remote is initialized. Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
This commit is contained in:
+3
-1
@@ -286,8 +286,10 @@ koji: prekoji-checks kojidef
|
||||
@if ! git branch | grep -q -E '^\* master'; then \
|
||||
echo "Error: Must be on the master branch to submit to koji" >&2; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
if git rev-parse --verify --quiet origin/master > /dev/null; then \
|
||||
git pull --rebase; \
|
||||
fi
|
||||
git pull --rebase
|
||||
git tag $(SRPMVERS)
|
||||
git push origin master refs/tags/$(SRPMVERS)
|
||||
$(KOJI_CMD) build $$KOJI_NOWAIT $(KOJI_TAG) $(PKG_BASE_URL)/$(PKG_NAME)?#$(SRPMVERS)
|
||||
|
||||
Reference in New Issue
Block a user