Skip to content

Commit

Permalink
Merge pull request #28 from gliderlabs/master
Browse files Browse the repository at this point in the history
v0.1.0
  • Loading branch information
progrium committed Jul 2, 2015
2 parents 4e19043 + 8259201 commit d3d8e78
Show file tree
Hide file tree
Showing 27 changed files with 702 additions and 143 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
build
release
bindata.go
tests/project/.gun
29 changes: 28 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Change Log
All notable changes to this project will be documented in this file.


## [Unreleased][unreleased]
### Fixed

Expand All @@ -10,6 +11,31 @@ All notable changes to this project will be documented in this file.

### Changed

## [0.1.0] - 2015-07-02
### Fixed
- Resolved issue where `deps-install` download URL has a redirect
- Ensure `gun-find-root` changes working directory to $GUN_ROOT

### Added
- `-t` and `--trace` as last argument, enables `-x` closer to command
- Basic test coverage
- Build artifacts on CircleCI, including Go workspace
- Calling help explicitly will show second level commands
- `GUN_PATH` used for module sourcing with `PATH`-like semantics
- Added some initial remote module libraries

### Removed

### Changed
- Deprecated `GUN_MODULE_PATH` in favor of `GUN_PATH`
- Standard error used for warnings and errors
- Static compilation of binary
- `version` builtin command is now `:version`
- `help` builtin command is now `:help`
- `update` builtin command is now `:update`
- `env` builtin command is now `:env`
- `fn` builtin command is now `::`

## [0.0.7] - 2015-02-20
### Added
- Support for `Gunfile` as global module / profile
Expand Down Expand Up @@ -70,7 +96,8 @@ All notable changes to this project will be documented in this file.
### Fixed
- Fixed profiles not loading

[unreleased]: https://github.com/gliderlabs/glidergun/compare/v0.0.7...HEAD
[unreleased]: https://github.com/gliderlabs/glidergun/compare/v0.1.0...HEAD
[0.1.0]: https://github.com/gliderlabs/glidergun/compare/v0.0.7...v0.1.0
[0.0.7]: https://github.com/gliderlabs/glidergun/compare/v0.0.6...v0.0.7
[0.0.6]: https://github.com/gliderlabs/glidergun/compare/v0.0.5...v0.0.6
[0.0.5]: https://github.com/gliderlabs/glidergun/compare/v0.0.4...v0.0.5
Expand Down
35 changes: 28 additions & 7 deletions Makefile
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

## Upgrading

$ gun update
$ gun :update
9 changes: 5 additions & 4 deletions circle.yml
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
14 changes: 7 additions & 7 deletions glidergun.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ func main() {
"checksum": Checksum,
"selfupdate": Selfupdate,
}, []string{
"include/fn.bash",
"include/cmd.bash",
"include/module.bash",
"include/env.bash",
"include/gun.bash",
"include/deps.bash",
"include/color.bash",
"src/fn.bash",
"src/cmd.bash",
"src/env.bash",
"src/gun.bash",
"src/module.bash",
"src/deps.bash",
"src/color.bash",
}, Asset, true)
}
15 changes: 0 additions & 15 deletions include/module.bash

This file was deleted.

12 changes: 12 additions & 0 deletions lib/README.md
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
8 changes: 5 additions & 3 deletions tests/project/cmds/aws.bash → lib/aws/aws.bash
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 $@
}
}
Loading

0 comments on commit d3d8e78

Please sign in to comment.