-
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 #2 from gliderlabs/master
0.0.3 release
- Loading branch information
Showing
12 changed files
with
131 additions
and
370 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,2 +1,3 @@ | ||
build | ||
example/.gun | ||
example/.gun | ||
bindata.go |
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,35 @@ | ||
# Change Log | ||
All notable changes to this project will be documented in this file. | ||
|
||
## [Unreleased][unreleased] | ||
### Fixed | ||
|
||
### Added | ||
|
||
### Removed | ||
|
||
### Changed | ||
|
||
## [0.0.3] - 2015-02-09 | ||
### Fixed | ||
- Fixed profile loading logic | ||
|
||
### Added | ||
- Added basic colored output helpers | ||
- Added `fn-source` function | ||
|
||
### Removed | ||
- Dropped bindata.go from versioned source | ||
|
||
### Changed | ||
- Changed `env-export` to `env-import`, now allows default value | ||
- Checksum checking is skipped if index provides none | ||
- `show-env` (`env` subcommand) output is better aligned | ||
|
||
## [0.0.2] - 2015-02-04 | ||
### Fixed | ||
- Fixed profiles not loading | ||
|
||
[unreleased]: https://github.com/gliderlabs/glidergun/compare/v0.0.3...HEAD | ||
[0.0.3]: https://github.com/gliderlabs/glidergun/compare/v0.0.1...v0.0.3 | ||
[0.0.2]: https://github.com/gliderlabs/glidergun/compare/v0.0.1...v0.0.2 |
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,7 +1,7 @@ | ||
NAME=glidergun | ||
BINARYNAME=gun | ||
ARCH=$(shell uname -m) | ||
VERSION=0.0.2 | ||
VERSION=0.0.3 | ||
|
||
build: | ||
go-bindata include | ||
|
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
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
|
||
declare -A color_table=( | ||
["red"]='\033[00;31m' | ||
["green"]='\033[00;32m' | ||
["yellow"]='\033[00;33m' | ||
["blue"]='\033[00;34m' | ||
["purple"]='\033[00;35m' | ||
["cyan"]="\033[00;36m" | ||
["white"]='\033[00;37m' | ||
["red-bright"]='\033[01;31m' | ||
["green-bright"]='\033[01;32m' | ||
["yellow-bright"]='\033[01;33m' | ||
["blue-bright"]='\033[01;34m' | ||
["purple-bright"]='\033[01;35m' | ||
["cyan-bright"]='\033[01;36m' | ||
["white-bright"]='\033[01;37m' | ||
) | ||
|
||
color-init() { | ||
for color in "${!color_table[@]}"; do | ||
eval "$color() { color-cat $color; }" | ||
done | ||
} | ||
|
||
color-cat() { | ||
declare color="$1" | ||
while read -r; do | ||
printf "${color_table[$color]}%s\033[0m\n" "$REPLY" | ||
done | ||
} | ||
|
||
color-cycle() { | ||
colors=(${!color_table[@]}) | ||
index="$((($BASHPID%${#color_table[@]})))" | ||
color-cat "${colors[$index]}" | ||
} |
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,13 +1,27 @@ | ||
|
||
declare -a _env | ||
|
||
env-export() { | ||
declare var="$1" | ||
env-import() { | ||
declare var="$1" default="$2" | ||
if [[ -z "${!var+x}" ]]; then | ||
if [[ -z "${2+x}" ]]; then | ||
echo "!! Imported variable $var must be set in profile or environment." | red | ||
exit 2 | ||
else | ||
export $var="$default" | ||
fi | ||
fi | ||
_env+=($var) | ||
} | ||
|
||
env-show() { | ||
local longest=0 | ||
for var in "${_env[@]}"; do | ||
echo "$var=${!var}" | ||
if [[ "${#var}" -gt "$longest" ]]; then | ||
longest="${#var}" | ||
fi | ||
done | ||
for var in "${_env[@]}"; do | ||
printf "%-${longest}s = %s\n" "$var" "${!var}" | ||
done | ||
} |
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