-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from gliderlabs/master
v0.1.0
- Loading branch information
Showing
27 changed files
with
702 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
build | ||
release | ||
bindata.go | ||
tests/project/.gun |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,50 @@ | ||
NAME=glidergun | ||
BINARYNAME=gun | ||
OWNER=gliderlabs | ||
ARCH=$(shell uname -m) | ||
VERSION=0.0.7 | ||
VERSION=0.1.0 | ||
|
||
build: | ||
go-bindata include | ||
mkdir -p build/Linux && GOOS=linux go build -ldflags "-X main.Version $(VERSION)" -o build/Linux/$(BINARYNAME) | ||
mkdir -p build/Darwin && GOOS=darwin go build -ldflags "-X main.Version $(VERSION)" -o build/Darwin/$(BINARYNAME) | ||
build: src | ||
mkdir -p build/Linux && GOOS=linux CGO_ENABLED=0 go build -a \ | ||
-installsuffix cgo \ | ||
-ldflags "-X main.Version $(VERSION)" \ | ||
-o build/Linux/$(BINARYNAME) | ||
mkdir -p build/Darwin && GOOS=darwin CGO_ENABLED=0 go build -a \ | ||
-installsuffix cgo \ | ||
-ldflags "-X main.Version $(VERSION)" \ | ||
-o build/Darwin/$(BINARYNAME) | ||
|
||
test: src | ||
go install | ||
GUN=glidergun basht tests/*.bash | ||
|
||
src: | ||
go-bindata src | ||
|
||
install: build | ||
install build/$(shell uname -s)/gun /usr/local/bin | ||
|
||
deps: | ||
go get -u github.com/jteeuwen/go-bindata/... | ||
go get -u github.com/progrium/gh-release/... | ||
go get -u github.com/progrium/basht/... | ||
go get || true | ||
|
||
release: | ||
rm -rf release && mkdir release | ||
tar -zcf release/$(NAME)_$(VERSION)_Linux_$(ARCH).tgz -C build/Linux $(BINARYNAME) | ||
tar -zcf release/$(NAME)_$(VERSION)_Darwin_$(ARCH).tgz -C build/Darwin $(BINARYNAME) | ||
gh-release checksums sha256 | ||
gh-release create gliderlabs/$(NAME) $(VERSION) $(shell git rev-parse --abbrev-ref HEAD) v$(VERSION) | ||
gh-release create $(OWNER)/$(NAME) $(VERSION) $(shell git rev-parse --abbrev-ref HEAD) v$(VERSION) | ||
|
||
circleci: | ||
rm ~/.gitconfig | ||
rm -rf /home/ubuntu/.go_workspace/src/github.com/$(OWNER)/$(NAME) && cd .. \ | ||
&& mkdir -p /home/ubuntu/.go_workspace/src/github.com/$(OWNER) \ | ||
&& mv $(NAME) /home/ubuntu/.go_workspace/src/github.com/$(OWNER)/$(NAME) \ | ||
&& ln -s /home/ubuntu/.go_workspace/src/github.com/$(OWNER)/$(NAME) $(NAME) | ||
|
||
clean: | ||
rm -rf build release | ||
|
||
.PHONY: build release | ||
.PHONY: build release src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,4 @@ | |
|
||
## Upgrading | ||
|
||
$ gun update | ||
$ gun :update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
dependencies: | ||
pre: | ||
- rm ~/.gitconfig | ||
- make deps | ||
- make circleci | ||
override: | ||
- make deps | ||
- make build | ||
post: | ||
- tar -czvf $CIRCLE_ARTIFACTS/gun-linux.tgz -C build/Linux gun | ||
- tar -czvf $CIRCLE_ARTIFACTS/gun-darwin.tgz -C build/Darwin gun | ||
- tar -czvf $CIRCLE_ARTIFACTS/go-workspace.tgz -C ~/.go_workspace . | ||
|
||
test: | ||
override: | ||
- /bin/true | ||
- make test | ||
|
||
deployment: | ||
release: | ||
branch: release | ||
commands: | ||
- make release | ||
- make release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# glidergun module library | ||
|
||
## Require example | ||
``` | ||
init() { | ||
module-require github.com/gliderlabs/glidergun/lib/aws | ||
} | ||
``` | ||
|
||
## Updating a module | ||
|
||
$ gun :get github.com/gliderlabs/glidergun/lib/aws |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
# Shared AWS functions wrapping aws-cli | ||
|
||
init() { | ||
env-import AWS_DEFAULT_REGION | ||
env-import AWS_ACCESS_KEY_ID | ||
env-import AWS_SECRET_ACCESS_KEY | ||
|
||
deps-require aws | ||
deps-require jq 1.4 | ||
} | ||
|
||
aws-json() { | ||
: ${AWS_ACCESS_KEY_ID:?} ${AWS_SECRET_ACCESS_KEY:?} | ||
aws --output json $@ | ||
} | ||
|
||
aws-text() { | ||
: ${AWS_ACCESS_KEY_ID:?} ${AWS_SECRET_ACCESS_KEY:?} | ||
aws --output text $@ | ||
} | ||
} |
Oops, something went wrong.