Skip to content

Commit

Permalink
Use the same template variables everywhere
Browse files Browse the repository at this point in the history
And let the template decide where they go
  • Loading branch information
afbjorklund committed Feb 22, 2021
1 parent 3c66f8b commit b3b9043
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,8 @@ out/minikube_$(DEB_VERSION)-$(DEB_REVISION)_%.deb: out/minikube-linux-%
$(eval DEB_PACKAGING_DIRECTORY_$*=$(shell mktemp -d --suffix ".minikube_$(DEB_VERSION)-$*-deb"))
cp -r installers/linux/deb/minikube_deb_template/* $(DEB_PACKAGING_DIRECTORY_$*)/
chmod 0755 $(DEB_PACKAGING_DIRECTORY_$*)/DEBIAN
sed -E -i 's/--VERSION--/'$(DEB_VERSION)-$(DEB_REVISION)'/g' $(DEB_PACKAGING_DIRECTORY_$*)/DEBIAN/control
sed -E -i 's/--VERSION--/'$(DEB_VERSION)'/g' $(DEB_PACKAGING_DIRECTORY_$*)/DEBIAN/control
sed -E -i 's/--REVISION--/'$(DEB_REVISION)'/g' $(DEB_PACKAGING_DIRECTORY_$*)/DEBIAN/control
sed -E -i 's/--ARCH--/'$*'/g' $(DEB_PACKAGING_DIRECTORY_$*)/DEBIAN/control

if [ "$*" = "amd64" ]; then \
Expand All @@ -526,7 +527,7 @@ out/minikube-$(RPM_VERSION)-0.%.rpm: out/minikube-linux-%
$(eval RPM_PACKAGING_DIRECTORY_$*=$(shell mktemp -d --suffix ".minikube_$(RPM_VERSION)-$*-rpm"))
cp -r installers/linux/rpm/minikube_rpm_template/* $(RPM_PACKAGING_DIRECTORY_$*)/
sed -E -i 's/--VERSION--/'$(RPM_VERSION)'/g' $(RPM_PACKAGING_DIRECTORY_$*)/minikube.spec
sed -E -i 's/--RELEASE--/'$(RPM_REVISION)'/g' $(RPM_PACKAGING_DIRECTORY_$*)/minikube.spec
sed -E -i 's/--REVISION--/'$(RPM_REVISION)'/g' $(RPM_PACKAGING_DIRECTORY_$*)/minikube.spec
sed -E -i 's|--OUT--|'$(PWD)/out'|g' $(RPM_PACKAGING_DIRECTORY_$*)/minikube.spec
rpmbuild -bb -D "_rpmdir $(PWD)/out" --target $* \
$(RPM_PACKAGING_DIRECTORY_$*)/minikube.spec
Expand Down
2 changes: 1 addition & 1 deletion installers/linux/deb/minikube_deb_template/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: minikube
Version: --VERSION--
Version: --VERSION-----REVISION--
Section: base
Priority: optional
Architecture: --ARCH--
Expand Down
2 changes: 1 addition & 1 deletion installers/linux/rpm/minikube_rpm_template/minikube.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Name: minikube
Version: --VERSION--
Release: --RELEASE--
Release: --REVISION--
Summary: Run Kubernetes locally
License: ASL 2.0
Group: Development/Tools
Expand Down

0 comments on commit b3b9043

Please sign in to comment.