This repository was archived by the owner on Jan 22, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,11 +24,30 @@ jobs:
2424 - run : go get golang.org/x/tools/cmd/goimports
2525 - run : " ! goimports ./... 2>&1 | read"
2626 - run : " ! go mod tidy ./... 2>&1 | read"
27+ publish-github-release :
28+ docker :
29+ - image : circleci/golang:1.8
30+ steps :
31+ - checkout
32+ - run : ./buildAll.sh
33+ - run :
34+ command : |
35+ go get github.com/tcnksm/ghr
36+ VERSION=$(`cat VERSION`-`git rev-parse --short HEAD`)
37+ ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${VERSION} ./bin/
38+
2739workflows :
2840 version : 2
2941 build :
3042 jobs :
3143 - integration
3244 - unit
3345 - lint
34-
46+ - publish-github-release
47+ requires :
48+ - integration
49+ - unit
50+ - lint
51+ filters :
52+ # branches:
53+ # only: master
Original file line number Diff line number Diff line change 1+ 1.0.0
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ export VERSION=" ` cat VERSION` -` git rev-parse --short HEAD` "
4+
5+ go build -ldflags " -X main.VersionNumber=$VERSION " -o bin/kssh-linux src/cmd/kssh/kssh.go
6+ go build -ldflags " -X main.VersionNumber=$VERSION " -o bin/keybaseca-linux src/cmd/keybaseca/keybaseca.go
7+
8+ GOOS=darwin GOARCH=amd64 go build -ldflags " -X main.VersionNumber=$VERSION " -o bin/kssh-mac src/cmd/kssh/kssh.go
9+ GOOS=darwin GOARCH=amd64 go build -ldflags " -X main.VersionNumber=$VERSION " -o bin/keybaseca-mac src/cmd/keybaseca/keybaseca.go
10+
11+ GOOS=windows GOARCH=amd64 go build -ldflags " -X main.VersionNumber=$VERSION " -o bin/kssh-windows src/cmd/kssh/kssh.go
12+ GOOS=windows GOARCH=amd64 go build -ldflags " -X main.VersionNumber=$VERSION " -o bin/keybaseca-windows src/cmd/keybaseca/keybaseca.go
Original file line number Diff line number Diff line change @@ -26,11 +26,13 @@ import (
2626 "github.com/urfave/cli"
2727)
2828
29+ var VersionNumber = "master"
30+
2931func main () {
3032 app := cli .NewApp ()
3133 app .Name = "keybaseca"
3234 app .Usage = "An SSH CA built on top of Keybase"
33- app .Version = "0.0.1"
35+ app .Version = VersionNumber
3436 app .Flags = []cli.Flag {
3537 cli.BoolFlag {
3638 Name : "wipe-all-configs" ,
Original file line number Diff line number Diff line change @@ -106,6 +106,8 @@ var cliArguments = []kssh.CLIArgument{
106106 {Name : "--set-keybase-binary" , HasArgument : true },
107107}
108108
109+ var VersionNumber = "master"
110+
109111func generateHelpPage () string {
110112 return fmt .Sprintf (`NAME:
111113 kssh - A replacement ssh binary using Keybase SSH CA to provision SSH keys
@@ -114,7 +116,7 @@ USAGE:
114116 kssh [kssh options] [ssh arguments...]
115117
116118VERSION:
117- 0.0.1
119+ %s
118120
119121GLOBAL OPTIONS:
120122 --help Show help
@@ -129,7 +131,7 @@ GLOBAL OPTIONS:
129131 --set-default-user Set the default SSH user to be used for kssh. Useful if you use ssh configs that do not set
130132 a default SSH user
131133 --clear-default-user Clear the default SSH user
132- --set-keybase-binary Run kssh with a specific keybase binary rather than resolving via $PATH ` )
134+ --set-keybase-binary Run kssh with a specific keybase binary rather than resolving via $PATH ` , VersionNumber )
133135}
134136
135137type Action int
You can’t perform that action at this time.
0 commit comments