Skip to content

Commit

Permalink
build: simplify release
Browse files Browse the repository at this point in the history
  • Loading branch information
alexec committed Jan 27, 2020
1 parent 3572d4d commit 67a5185
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -413,17 +413,9 @@ clean:
echo 'make pre-push' > .git/hooks/pre-push
chmod +x .git/hooks/pre-push

.PHONY: must-be-clean
must-be-clean:
# Check everthing has been committed to Git
@if [ "$(GIT_TREE_STATE)" != "clean" ]; then echo 'git tree state is $(GIT_TREE_STATE)' ; exit 1; fi

.PHONY: pre-commit
pre-commit: test lint codegen manifests start pf-bg smoke test-api test-cli

.PHONY: pre-push
pre-push: must-be-clean pre-commit must-be-clean

# release

.PHONY: prepare-release
Expand All @@ -432,13 +424,6 @@ prepare-release: manifests codegen
git diff --quiet || git commit -am "Update manifests to $(VERSION)"
git tag -f $(VERSION)

.PHONY: check-release
check-release: pre-push
ifeq ($(findstring release,$(GIT_BRANCH)),release)
# Check the tag is correct
@if [ "$(GIT_TAG)" != "$(VERSION)" ]; then echo 'git tag ($(GIT_TAG)) does not match VERSION ($(VERSION))'; exit 1; fi
endif

.PHONY: publish-release
publish-release:
# Push images to Docker Hub
Expand All @@ -447,4 +432,4 @@ publish-release:
docker push $(IMAGE_NAMESPACE)/workflow-controller:$(VERSION)

.PHONY: release
release: status prepare-release check-release publish-release
release: status prepare-release build publish-release

0 comments on commit 67a5185

Please sign in to comment.