summarylogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorlarte2016-12-14 14:49:52 +0200
committerlarte2016-12-14 14:49:52 +0200
commitf0ca182eca5dbcd13fe94767c66dd994d812f35e (patch)
tree4264b230dfc956d0d8cadd246ea6e96982f895d7 /Makefile
parent9761022e1046c078efc74765cdf251f2a9b53c82 (diff)
downloadaur-f0ca182eca5dbcd13fe94767c66dd994d812f35e.tar.gz
Modified build script to use make
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile41
1 files changed, 41 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 00000000000..a8d8902782e
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,41 @@
+
+
+
+
+PHOHY = clean release
+
+BASEURL:=http://storage.googleapis.com/kubernetes-release/release
+
+
+check:
+ifndef VERSION
+ @echo "Define version in ENV"
+ @exit 1;
+else
+ @echo "Build version ${VERSION}"
+endif
+
+
+test:
+ set -e ;\
+ MD5=`curl -s https://s3-eu-west-1.amazonaws.com/foodie-devops/ec2init.sh|md5sum`; \
+ echo $${MD5}; \
+
+prepare: check
+ @mkdir -p tmp
+ @curl -s ${BASEURL}/v${VERSION}/bin/linux/amd64/kubectl > tmp/kubectl_amd64
+ @curl -s ${BASEURL}/v${VERSION}/bin/linux/386/kubectl > tmp/kubectl_386
+
+release: prepare
+ set -e; \
+ MD5_AMD64=`md5sum tmp/kubectl_amd64 | awk '{print $$1}'`; \
+ MD5_386=`md5sum tmp/kubectl_386 | awk '{print $$1}'`; \
+ sed -i.bak -r -e "s/md5sums_i686=.*/md5sums_i686=('$${MD5_386}')/g" \
+ -e "s/md5sums_x86_64=.*/md5sums_x86_64=('$${MD5_AMD64}')/g" PKGBUILD; \
+ makepkg --printsrcinfo > .SRCINFO; \
+ makepkg; \
+ sudo pacman -U kubectl-bin*; \
+
+
+clean:
+ rm -rf kubectl-* pkg src *.bak tmp