diff --git a/Makefile b/Makefile index 24bf418b8ee8762ffd57fb877cc1776613467e86..46932f22942ceb49e9c61d5dc62bebb550060a45 100644 --- a/Makefile +++ b/Makefile @@ -91,7 +91,15 @@ $(GOPATH)/bin/go-bindata: GOBIN=$(GOPATH)/bin go get github.com/jteeuwen/go-bindata/... .PHONY: cross -cross: out/localkube out/minikube-darwin-amd64 out/minikube-windows-amd64.exe +cross: out/localkube out/minikube-linux-amd64 out/minikube-darwin-amd64 out/minikube-windows-amd64.exe + +.PHONE: checksum +checksum: + for f in out/localkube out/minikube-linux-amd64 out/minikube-darwin-amd64 out/minikube-windows-amd64.exe ; do \ + if [ -f "$${f}" ]; then \ + openssl sha256 "$${f}" | awk '{print $$2}' > "$${f}.sha256" ; \ + fi ; \ + done .PHONY: clean clean: diff --git a/RELEASING.md b/RELEASING.md index e2a0063a2abec1521b643d228d7aef2e914c9ecb..015ec87eefe94f09b010db8a93b45ea495433375 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -14,9 +14,26 @@ If you do this, bump the ISO URL to point to the new ISO, and send a PR. See [this PR](https://github.com/kubernetes/minikube/pull/165) for an example. +## Run integration tests + +Run this command: +```shell +make integration +``` +Investigate and fix any failures. + +## Build the Release + +Run this command: + +```shell +make cross checksum +``` + ## Add the version to the releases.json file -Add an entry **to the top** of deploy/minikube/releases.json with the version, and send a PR. +Add an entry **to the top** of deploy/minikube/releases.json with the version and checksums. +Send a PR. This file controls the auto update notifications in minikube. Only add entries to this file that should be released to all users (no pre-release, alpha or beta releases). The file must be uploaded to GCS before notifications will go out. That step comes at the end. @@ -25,13 +42,16 @@ The schema for this file can be found in deploy/minikube/schema.json. An automated test to verify the schema runs in Travis before each submit. -## Run integration tests +## Upload to GCS: -Run this command: ```shell -make integration +gsutil cp out/minikube-linux-amd64 gs://minikube/releases/$RELEASE/ +gsutil cp out/minikube-linux-amd64.sha256 gs://minikube/releases/$RELEASE/ +gsutil cp out/minikube-darwin-amd64 gs://minikube/releases/$RELEASE/ +gsutil cp out/minikube-darwin-amd64.sha256 gs://minikube/releases/$RELEASE/ +gsutil cp out/minikube-windows-amd64.exe gs://minikube/releases/$RELEASE/ +gsutil cp out/minikube-windows-amd64.exe.sha256 gs://minikube/releases/$RELEASE/ ``` -Investigate and fix any failures. ## Tag the Release @@ -39,27 +59,11 @@ Run a command like this to tag it locally: `git tag -a v0.2.0 -m "0.2.0 Release" And run a command like this to push the tag: `git push upstream v0.2.0`. -## Build the Release - -Run these commands: - -```shell -GOOS=linux GOARCH=amd64 make out/minikube-linux-amd64 -GOOS=darwin GOARCH=amd64 make out/minikube-darwin-amd64 -``` - -## Upload to GCS: - -```shell -gsutil cp out/minikube-linux-amd64 gs://minikube/releases/$RELEASE/ -gsutil cp out/minikube-darwin-amd64 gs://minikube/releases/$RELEASE/ -``` - ## Create a Release in Github Create a new release based on your tag, like [this one](https://github.com/kubernetes/minikube/releases/tag/v0.2.0). -Upload the files, and calculate checksums. +Upload the files, and calculated checksums. ## Upload the releases.json file to GCS diff --git a/deploy/minikube/schema.json b/deploy/minikube/schema.json index afdfd6a5a8561cfe5f99b5b334da0a2a63a26978..35a03a5673c3caadd6bcba731b082f803642526e 100644 --- a/deploy/minikube/schema.json +++ b/deploy/minikube/schema.json @@ -6,10 +6,28 @@ "properties": { "name": { "type": "string" + }, + "checksums": { + "type": "object", + "properties": { + "windows": { + "type": "number", + "pattern": "^[A-Fa-f0-9]{64}$" + }, + "darwin": { + "type": "number", + "pattern": "^[A-Fa-f0-9]{64}$" + }, + "linux": { + "type": "number", + "pattern": "^[A-Fa-f0-9]{64}$" + } + }, + "required": ["windows", "darwin", "linux"] } }, "required": [ "name" ] } -} \ No newline at end of file +}