Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid git add --all from make tag #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packs/D/charts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ else ifeq ($(OS),Linux)
sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/REPLACE_ME_DOCKER_REGISTRY_ORG\/REPLACE_ME_APP_NAME|" values.yaml
sed -i -e "s/tag:.*/tag: $(RELEASE_VERSION)/" values.yaml
else
echo "platfrom $(OS) not supported to release from"
echo "platform $(OS) not supported to release from"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a typo I noticed while I was here.

exit -1
endif
git add --all
git commit -m "release $(RELEASE_VERSION)" --allow-empty # if first release then no verion update is performed
git add *.yaml
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main fix.

git commit -m "release $(RELEASE_VERSION)" --allow-empty # if first release then no version update is performed
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another typo.

git tag -fa v$(RELEASE_VERSION) -m "Release version $(RELEASE_VERSION)"
git push origin v$(RELEASE_VERSION)
2 changes: 1 addition & 1 deletion packs/D/preview/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ else ifeq ($(OS),Linux)
sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/REPLACE_ME_DOCKER_REGISTRY_ORG\/REPLACE_ME_APP_NAME|" values.yaml
sed -i -e "s/tag:.*/tag: $(PREVIEW_VERSION)/" values.yaml
else
echo "platfrom $(OS) not supported to release from"
echo "platform $(OS) not supported to release from"
exit -1
endif
echo " version: $(PREVIEW_VERSION)" >> requirements.yaml
Expand Down
6 changes: 3 additions & 3 deletions packs/appserver/charts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ else ifeq ($(OS),Linux)
sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/REPLACE_ME_DOCKER_REGISTRY_ORG\/REPLACE_ME_APP_NAME|" values.yaml
sed -i -e "s/tag:.*/tag: $(RELEASE_VERSION)/" values.yaml
else
echo "platfrom $(OS) not supported to release from"
echo "platform $(OS) not supported to release from"
exit -1
endif
git add --all
git commit -m "release $(RELEASE_VERSION)" --allow-empty # if first release then no verion update is performed
git add *.yaml
git commit -m "release $(RELEASE_VERSION)" --allow-empty # if first release then no version update is performed
git tag -fa v$(RELEASE_VERSION) -m "Release version $(RELEASE_VERSION)"
git push origin v$(RELEASE_VERSION)
2 changes: 1 addition & 1 deletion packs/appserver/preview/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ else ifeq ($(OS),Linux)
sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/REPLACE_ME_DOCKER_REGISTRY_ORG\/REPLACE_ME_APP_NAME|" values.yaml
sed -i -e "s/tag:.*/tag: $(PREVIEW_VERSION)/" values.yaml
else
echo "platfrom $(OS) not supported to release from"
echo "platform $(OS) not supported to release from"
exit -1
endif
echo " version: $(PREVIEW_VERSION)" >> requirements.yaml
Expand Down
6 changes: 3 additions & 3 deletions packs/csharp/charts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ else ifeq ($(OS),Linux)
sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/REPLACE_ME_DOCKER_REGISTRY_ORG\/REPLACE_ME_APP_NAME|" values.yaml
sed -i -e "s/tag:.*/tag: $(RELEASE_VERSION)/" values.yaml
else
echo "platfrom $(OS) not supported to release from"
echo "platform $(OS) not supported to release from"
exit -1
endif
git add --all
git commit -m "release $(RELEASE_VERSION)" --allow-empty # if first release then no verion update is performed
git add *.yaml
git commit -m "release $(RELEASE_VERSION)" --allow-empty # if first release then no version update is performed
git tag -fa v$(RELEASE_VERSION) -m "Release version $(RELEASE_VERSION)"
git push origin v$(RELEASE_VERSION)
6 changes: 3 additions & 3 deletions packs/dropwizard/charts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ else ifeq ($(OS),Linux)
sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/REPLACE_ME_DOCKER_REGISTRY_ORG\/REPLACE_ME_APP_NAME|" values.yaml
sed -i -e "s/tag:.*/tag: $(RELEASE_VERSION)/" values.yaml
else
echo "platfrom $(OS) not supported to release from"
echo "platform $(OS) not supported to release from"
exit -1
endif
git add --all
git commit -m "release $(RELEASE_VERSION)" --allow-empty # if first release then no verion update is performed
git add *.yaml
git commit -m "release $(RELEASE_VERSION)" --allow-empty # if first release then no version update is performed
git tag -fa v$(RELEASE_VERSION) -m "Release version $(RELEASE_VERSION)"
git push origin v$(RELEASE_VERSION)
2 changes: 1 addition & 1 deletion packs/dropwizard/preview/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ else ifeq ($(OS),Linux)
sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/REPLACE_ME_DOCKER_REGISTRY_ORG\/REPLACE_ME_APP_NAME|" values.yaml
sed -i -e "s/tag:.*/tag: $(PREVIEW_VERSION)/" values.yaml
else
echo "platfrom $(OS) not supported to release from"
echo "platform $(OS) not supported to release from"
exit -1
endif
echo " version: $(PREVIEW_VERSION)" >> requirements.yaml
Expand Down
20 changes: 10 additions & 10 deletions packs/go/charts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CHART_REPO := http://jenkins-x-chartmuseum:8080
CURRENT=$(pwd)
NAME := REPLACE_ME_APP_NAME
OS := $(shell uname)
VERSION := $(shell cat ../../VERSION)
RELEASE_VERSION := $(shell cat ../../VERSION)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason, the go pack is subtly different from all the rest. Starting to normalize that here. The other difference is $(NAME) vs. REPLACE_ME_APP_NAME below, though I was unsure whether it was proper to also normalize that.


build: clean
rm -rf requirements.lock
Expand Down Expand Up @@ -32,17 +32,17 @@ release: clean

tag:
ifeq ($(OS),Darwin)
sed -i "" -e "s/version:.*/version: $(VERSION)/" Chart.yaml
sed -i "" -e "s/tag:.*/tag: $(VERSION)/" values.yaml
sed -i "" -e "s/version:.*/version: $(RELEASE_VERSION)/" Chart.yaml
sed -i "" -e "s/tag:.*/tag: $(RELEASE_VERSION)/" values.yaml
else ifeq ($(OS),Linux)
sed -i -e "s/version:.*/version: $(VERSION)/" Chart.yaml
sed -i -e "s/version:.*/version: $(RELEASE_VERSION)/" Chart.yaml
sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/REPLACE_ME_DOCKER_REGISTRY_ORG\/$(NAME)|" values.yaml
sed -i -e "s/tag:.*/tag: $(VERSION)/" values.yaml
sed -i -e "s/tag:.*/tag: $(RELEASE_VERSION)/" values.yaml
else
echo "platfrom $(OS) not supported to tag with"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another unexplained difference in the go pack.

echo "platform $(OS) not supported to release from"
exit -1
endif
git add --all
git commit -m "release $(VERSION)" --allow-empty # if first release then no verion update is performed
git tag -fa v$(VERSION) -m "Release version $(VERSION)"
git push origin v$(VERSION)
git add *.yaml
git commit -m "release $(RELEASE_VERSION)" --allow-empty # if first release then no version update is performed
git tag -fa v$(RELEASE_VERSION) -m "Release version $(RELEASE_VERSION)"
git push origin v$(RELEASE_VERSION)
2 changes: 1 addition & 1 deletion packs/go/preview/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ else ifeq ($(OS),Linux)
sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/REPLACE_ME_DOCKER_REGISTRY_ORG\/REPLACE_ME_APP_NAME|" values.yaml
sed -i -e "s/tag:.*/tag: $(PREVIEW_VERSION)/" values.yaml
else
echo "platfrom $(OS) not supported to release from"
echo "platform $(OS) not supported to release from"
exit -1
endif
echo " version: $(PREVIEW_VERSION)" >> requirements.yaml
Expand Down
6 changes: 3 additions & 3 deletions packs/gradle/charts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ else ifeq ($(OS),Linux)
sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/REPLACE_ME_DOCKER_REGISTRY_ORG\/REPLACE_ME_APP_NAME|" values.yaml
sed -i -e "s/tag:.*/tag: $(RELEASE_VERSION)/" values.yaml
else
echo "platfrom $(OS) not supported to release from"
echo "platform $(OS) not supported to release from"
exit -1
endif
git add --all
git commit -m "release $(RELEASE_VERSION)" --allow-empty # if first release then no verion update is performed
git add *.yaml
git commit -m "release $(RELEASE_VERSION)" --allow-empty # if first release then no version update is performed
git tag -fa v$(RELEASE_VERSION) -m "Release version $(RELEASE_VERSION)"
git push origin v$(RELEASE_VERSION)
2 changes: 1 addition & 1 deletion packs/gradle/preview/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ else ifeq ($(OS),Linux)
sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/REPLACE_ME_DOCKER_REGISTRY_ORG\/REPLACE_ME_APP_NAME|" values.yaml
sed -i -e "s/tag:.*/tag: $(PREVIEW_VERSION)/" values.yaml
else
echo "platfrom $(OS) not supported to release from"
echo "platform $(OS) not supported to release from"
exit -1
endif
echo " version: $(PREVIEW_VERSION)" >> requirements.yaml
Expand Down
6 changes: 3 additions & 3 deletions packs/javascript/charts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ else ifeq ($(OS),Linux)
sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/REPLACE_ME_DOCKER_REGISTRY_ORG\/REPLACE_ME_APP_NAME|" values.yaml
sed -i -e "s/tag:.*/tag: $(RELEASE_VERSION)/" values.yaml
else
echo "platfrom $(OS) not supported to release from"
echo "platform $(OS) not supported to release from"
exit -1
endif
git add --all
git commit -m "release $(RELEASE_VERSION)" --allow-empty # if first release then no verion update is performed
git add *.yaml
git commit -m "release $(RELEASE_VERSION)" --allow-empty # if first release then no version update is performed
git tag -fa v$(RELEASE_VERSION) -m "Release version $(RELEASE_VERSION)"
git push origin v$(RELEASE_VERSION)
2 changes: 1 addition & 1 deletion packs/javascript/preview/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ else ifeq ($(OS),Linux)
sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/REPLACE_ME_DOCKER_REGISTRY_ORG\/REPLACE_ME_APP_NAME|" values.yaml
sed -i -e "s/tag:.*/tag: $(PREVIEW_VERSION)/" values.yaml
else
echo "platfrom $(OS) not supported to release from"
echo "platform $(OS) not supported to release from"
exit -1
endif
echo " version: $(PREVIEW_VERSION)" >> requirements.yaml
Expand Down
6 changes: 3 additions & 3 deletions packs/liberty/charts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ else ifeq ($(OS),Linux)
sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/REPLACE_ME_DOCKER_REGISTRY_ORG\/REPLACE_ME_APP_NAME|" values.yaml
sed -i -e "s/tag:.*/tag: $(RELEASE_VERSION)/" values.yaml
else
echo "platfrom $(OS) not supported to release from"
echo "platform $(OS) not supported to release from"
exit -1
endif
git add --all
git commit -m "release $(RELEASE_VERSION)" --allow-empty # if first release then no verion update is performed
git add *.yaml
git commit -m "release $(RELEASE_VERSION)" --allow-empty # if first release then no version update is performed
git tag -fa v$(RELEASE_VERSION) -m "Release version $(RELEASE_VERSION)"
git push origin v$(RELEASE_VERSION)
2 changes: 1 addition & 1 deletion packs/liberty/preview/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ else ifeq ($(OS),Linux)
sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/REPLACE_ME_DOCKER_REGISTRY_ORG\/REPLACE_ME_APP_NAME|" values.yaml
sed -i -e "s/tag:.*/tag: $(PREVIEW_VERSION)/" values.yaml
else
echo "platfrom $(OS) not supported to release from"
echo "platform $(OS) not supported to release from"
exit -1
endif
echo " version: $(PREVIEW_VERSION)" >> requirements.yaml
Expand Down
6 changes: 3 additions & 3 deletions packs/maven/charts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ else ifeq ($(OS),Linux)
sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/REPLACE_ME_DOCKER_REGISTRY_ORG\/REPLACE_ME_APP_NAME|" values.yaml
sed -i -e "s/tag:.*/tag: $(RELEASE_VERSION)/" values.yaml
else
echo "platfrom $(OS) not supported to release from"
echo "platform $(OS) not supported to release from"
exit -1
endif
git add --all
git commit -m "release $(RELEASE_VERSION)" --allow-empty # if first release then no verion update is performed
git add *.yaml
git commit -m "release $(RELEASE_VERSION)" --allow-empty # if first release then no version update is performed
git tag -fa v$(RELEASE_VERSION) -m "Release version $(RELEASE_VERSION)"
git push origin v$(RELEASE_VERSION)
2 changes: 1 addition & 1 deletion packs/maven/preview/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ else ifeq ($(OS),Linux)
sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/REPLACE_ME_DOCKER_REGISTRY_ORG\/REPLACE_ME_APP_NAME|" values.yaml
sed -i -e "s/tag:.*/tag: $(PREVIEW_VERSION)/" values.yaml
else
echo "platfrom $(OS) not supported to release from"
echo "platform $(OS) not supported to release from"
exit -1
endif
echo " version: $(PREVIEW_VERSION)" >> requirements.yaml
Expand Down
6 changes: 3 additions & 3 deletions packs/python/charts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ else ifeq ($(OS),Linux)
sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/REPLACE_ME_DOCKER_REGISTRY_ORG\/REPLACE_ME_APP_NAME|" values.yaml
sed -i -e "s/tag:.*/tag: $(RELEASE_VERSION)/" values.yaml
else
echo "platfrom $(OS) not supported to release from"
echo "platform $(OS) not supported to release from"
exit -1
endif
git add --all
git commit -m "release $(RELEASE_VERSION)" --allow-empty # if first release then no verion update is performed
git add *.yaml
git commit -m "release $(RELEASE_VERSION)" --allow-empty # if first release then no version update is performed
git tag -fa v$(RELEASE_VERSION) -m "Release version $(RELEASE_VERSION)"
git push origin v$(RELEASE_VERSION)
2 changes: 1 addition & 1 deletion packs/python/preview/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ else ifeq ($(OS),Linux)
sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/REPLACE_ME_DOCKER_REGISTRY_ORG\/REPLACE_ME_APP_NAME|" values.yaml
sed -i -e "s/tag:.*/tag: $(PREVIEW_VERSION)/" values.yaml
else
echo "platfrom $(OS) not supported to release from"
echo "platform $(OS) not supported to release from"
exit -1
endif
echo " version: $(PREVIEW_VERSION)" >> requirements.yaml
Expand Down
6 changes: 3 additions & 3 deletions packs/ruby/charts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ else ifeq ($(OS),Linux)
sed -i -e "s/repository:.*/repository: $(DOCKER_REGISTRY)\/$(ORG)\/$(APP_NAME)/" values.yaml
sed -i -e "s/tag:.*/tag: $(RELEASE_VERSION)/" values.yaml
else
echo "platfrom $(OS) not supported to release from"
echo "platform $(OS) not supported to release from"
exit -1
endif
git add --all
git commit -m "release $(RELEASE_VERSION)" --allow-empty # if first release then no verion update is performed
git add *.yaml
git commit -m "release $(RELEASE_VERSION)" --allow-empty # if first release then no version update is performed
git tag -fa v$(RELEASE_VERSION) -m "Release version $(RELEASE_VERSION)"
git push origin v$(RELEASE_VERSION)
2 changes: 1 addition & 1 deletion packs/ruby/preview/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ else ifeq ($(OS),Linux)
sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/REPLACE_ME_DOCKER_REGISTRY_ORG\/REPLACE_ME_APP_NAME|" values.yaml
sed -i -e "s/tag:.*/tag: $(PREVIEW_VERSION)/" values.yaml
else
echo "platfrom $(OS) not supported to release from"
echo "platform $(OS) not supported to release from"
exit -1
endif
echo " version: $(PREVIEW_VERSION)" >> requirements.yaml
Expand Down
6 changes: 3 additions & 3 deletions packs/rust/charts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ else ifeq ($(OS),Linux)
sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/REPLACE_ME_DOCKER_REGISTRY_ORG\/REPLACE_ME_APP_NAME|" values.yaml
sed -i -e "s/tag:.*/tag: $(RELEASE_VERSION)/" values.yaml
else
echo "platfrom $(OS) not supported to release from"
echo "platform $(OS) not supported to release from"
exit -1
endif
git add --all
git commit -m "release $(RELEASE_VERSION)" --allow-empty # if first release then no verion update is performed
git add *.yaml
git commit -m "release $(RELEASE_VERSION)" --allow-empty # if first release then no version update is performed
git tag -fa v$(RELEASE_VERSION) -m "Release version $(RELEASE_VERSION)"
git push origin v$(RELEASE_VERSION)
2 changes: 1 addition & 1 deletion packs/rust/preview/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ else ifeq ($(OS),Linux)
sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/REPLACE_ME_DOCKER_REGISTRY_ORG\/REPLACE_ME_APP_NAME|" values.yaml
sed -i -e "s/tag:.*/tag: $(PREVIEW_VERSION)/" values.yaml
else
echo "platfrom $(OS) not supported to release from"
echo "platform $(OS) not supported to release from"
exit -1
endif
echo " version: $(PREVIEW_VERSION)" >> requirements.yaml
Expand Down
6 changes: 3 additions & 3 deletions packs/scala/charts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ else ifeq ($(OS),Linux)
sed -i -e "s/repository:.*/repository: $(DOCKER_REGISTRY)\/REPLACE_ME_DOCKER_REGISTRY_ORG\/REPLACE_ME_APP_NAME/" values.yaml
sed -i -e "s/tag:.*/tag: $(RELEASE_VERSION)/" values.yaml
else
echo "platfrom $(OS) not supported to release from"
echo "platform $(OS) not supported to release from"
exit -1
endif
git add --all
git commit -m "release $(RELEASE_VERSION)" --allow-empty # if first release then no verion update is performed
git add *.yaml
git commit -m "release $(RELEASE_VERSION)" --allow-empty # if first release then no version update is performed
git tag -fa v$(RELEASE_VERSION) -m "Release version $(RELEASE_VERSION)"
git push origin v$(RELEASE_VERSION)
2 changes: 1 addition & 1 deletion packs/scala/preview/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ else ifeq ($(OS),Linux)
sed -i -e "s|repository:.*|repository: $(DOCKER_REGISTRY)\/REPLACE_ME_DOCKER_REGISTRY_ORG\/REPLACE_ME_APP_NAME|" values.yaml
sed -i -e "s/tag:.*/tag: $(PREVIEW_VERSION)/" values.yaml
else
echo "platfrom $(OS) not supported to release from"
echo "platform $(OS) not supported to release from"
exit -1
endif
echo " version: $(PREVIEW_VERSION)" >> requirements.yaml
Expand Down