Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit a403d53

Browse files
committed
Add publish releases
1 parent 2222d2c commit a403d53

File tree

3 files changed

+28
-2
lines changed

3 files changed

+28
-2
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
kubectl-switch
2-
kubectl/test-home
2+
kubectl/test-home./release

.travis.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,15 @@ language: go
22
go:
33
- "1.10"
44
- "1.11"
5-
install: true # bypass vendoring, we are using dep
5+
install: true # bypass vendoring, we are using vendoring
6+
before_deploy: bash -e ./release.sh
7+
deploy:
8+
provider: releases
9+
api_key:
10+
secure: "plSiXgXu6+o9SWiQZJY88fR7d2SzHtl/ys13bJkfZkvutYa258U9cxzMP0cTKr2gXcIcPXX1aeWiEhASG+Veu39X/Jg3+dG5jznGWXANisCCQSGyEnTWmyZW02mxO2gVeL1Y7FoyWIURbUeIIPxxjPXd8VFASWL7P0jG4AS3jXfUB6v/OkmRe8r3E5mzs7HN7b9dB80EkSOJnFOOpDsrPdc0+5xQHVvG0HRYYbE/6Dgzty8F4czKK7byR2bkXmfR+cb40+4IO0bTrYMUIuHzDWEs7+jq48JmEBPnwSDx0LrAzcL/IhM8Jz1tDgxKrGgvWZ9cPGq2WAm/X3RP+qOcS6cwRihHJMnu3tyTuG7H/UzRc3IpQpyiKUph8P2dGo911ZP/5Qao5cO2WhbEHlyEybifO+gyEDShfHCr3FnZWv5uODUKmG/b8E69VvrhkBYly4bcPnhNxmtsXnmwYpTPh/RW79D4lzvTEzmLSLclHbEoIL+h3eEVGxbZJXK1XYBL+ZV4mfgoEM+9fyQZzuM4JWhMKBh3QeBg6InDJ261bINTyw6q41u6xy0lXWzta2cFmIHE7t5/vjhEtbglctAypB1qY1FA5wE3SJ4wFI2ORkNxrfYYk8JqE6bp5i6S79kfeT6JlwtH6ioeonUXBNWyYnV7fRRGIQIOqrfQBzQmXu0="
11+
file_glob: true
12+
file: ./release/*
13+
skip_cleanup: true
14+
on:
15+
tags: true
16+
go: '1.11'

release.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash -e
2+
3+
mkdir -p release
4+
for os in linux darwin; do
5+
for arch in amd64 386; do
6+
echo "building for ${os} ${arch}"
7+
CGO_ENABLED=0 GOARCH=${arch} GOOS=${os} go build -o release/kubectl-switch-${os}-${arch} .
8+
done
9+
cp release/kubectl-switch-${os}-amd64 release/kubectl-switch-${os}-x86_64
10+
done
11+
12+
for f in $(ls ./release/); do
13+
shasum -a 1 ./release/${f} | awk '{print $1}' > ./release/${f}.sha1sum
14+
shasum -a 256 ./release/${f} | awk '{print $1}' > ./release/${f}.sha256sum
15+
done

0 commit comments

Comments
 (0)