From 826ecb3241dc1e0eb33c696485e72a596d691644 Mon Sep 17 00:00:00 2001 From: Viktor Benei Date: Fri, 2 Oct 2015 15:19:55 +0200 Subject: [PATCH 1/3] godeps-update --- Godeps/Godeps.json | 8 ++++---- .../stretchr/testify/assert/assertions.go | 20 +++---------------- 2 files changed, 7 insertions(+), 21 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index c54dfe7d..30f0ed18 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -41,13 +41,13 @@ }, { "ImportPath": "github.com/stretchr/testify/assert", - "Comment": "v1.0-42-gb8dc1ce", - "Rev": "b8dc1cecf15bdaf1988d9e87aa7cd98d899a06d6" + "Comment": "v1.0-49-g2b15294", + "Rev": "2b15294402a895a4224659d181866f545991021e" }, { "ImportPath": "github.com/stretchr/testify/require", - "Comment": "v1.0-42-gb8dc1ce", - "Rev": "b8dc1cecf15bdaf1988d9e87aa7cd98d899a06d6" + "Comment": "v1.0-49-g2b15294", + "Rev": "2b15294402a895a4224659d181866f545991021e" }, { "ImportPath": "gopkg.in/yaml.v2", diff --git a/Godeps/_workspace/src/github.com/stretchr/testify/assert/assertions.go b/Godeps/_workspace/src/github.com/stretchr/testify/assert/assertions.go index 023b1c39..22e3a6bb 100644 --- a/Godeps/_workspace/src/github.com/stretchr/testify/assert/assertions.go +++ b/Godeps/_workspace/src/github.com/stretchr/testify/assert/assertions.go @@ -287,24 +287,10 @@ func Exactly(t TestingT, expected, actual interface{}, msgAndArgs ...interface{} // // Returns whether the assertion was successful (true) or not (false). func NotNil(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { - - success := true - - if object == nil { - success = false - } else { - value := reflect.ValueOf(object) - kind := value.Kind() - if kind >= reflect.Chan && kind <= reflect.Slice && value.IsNil() { - success = false - } - } - - if !success { - Fail(t, "Expected value not to be nil.", msgAndArgs...) + if !isNil(object) { + return true } - - return success + return Fail(t, "Expected value not to be nil.", msgAndArgs...) } // isNil checks if a specified object is nil or not, without Failing. From cf7663331d2eb39bfd3061ba2046051b087503d1 Mon Sep 17 00:00:00 2001 From: Viktor Benei Date: Fri, 2 Oct 2015 15:22:24 +0200 Subject: [PATCH 2/3] v0.9.10 --- cli/cli.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/cli.go b/cli/cli.go index e59662a9..26fb2141 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -93,7 +93,7 @@ func Run() { app := cli.NewApp() app.Name = path.Base(os.Args[0]) app.Usage = "Environment variable manager" - app.Version = "0.9.9" + app.Version = "0.9.10" app.Author = "" app.Email = "" From 07e36ba9a4ad158eedb8f77c06c32ee345f0387c Mon Sep 17 00:00:00 2001 From: Viktor Benei Date: Fri, 2 Oct 2015 15:38:13 +0200 Subject: [PATCH 3/3] v0.9.10 changelog --- _changelogs/0.9.10.md | 21 +++++++++++++++++++++ _changelogs/upcoming.md | 31 ++----------------------------- 2 files changed, 23 insertions(+), 29 deletions(-) create mode 100644 _changelogs/0.9.10.md diff --git a/_changelogs/0.9.10.md b/_changelogs/0.9.10.md new file mode 100644 index 00000000..67d58505 --- /dev/null +++ b/_changelogs/0.9.10.md @@ -0,0 +1,21 @@ +## Changes + +* Environments got a new field: `IsTemplate` / `is_template`. This field indicates whether the value contains template expressions which should be evaluated before using the value, just like in case of `is_expand`. *This property is not used directly in `envman`, although this might change in the future.* +* Improved environment value and options cast: + * Now you can use `"NO"`, `"No"`, `"YES"`, `"Yes"`, `true`, `false`, `"true"`, `"false"` in every place `envman` expects a bool value (ex: `is_expand`). + * Every field where `envman` expects a string in now casted into a string. This means that you can now use `true` and `false` instead of `"true"` and `"false"` in `value_options`. Same is true for the value itself, so you can now write `true` instead of `"true"` and it'll still be casted to string. + + +## Install + +To install this version, run the following commands (in a bash shell): + +``` +curl -fL https://github.com/bitrise-io/envman/releases/download/0.9.10/envman-$(uname -s)-$(uname -m) > /usr/local/bin/envman +``` + +Then: + +``` +chmod +x /usr/local/bin/envman +``` diff --git a/_changelogs/upcoming.md b/_changelogs/upcoming.md index 88e65543..42c58024 100644 --- a/_changelogs/upcoming.md +++ b/_changelogs/upcoming.md @@ -1,31 +1,4 @@ ## Changes -* Environments got new field: IsTemplate. If IsTemplate is true, environment value, will handled with built in go template solutions. - Exmaple: - ``` - - script: - title: Template example - inputs: - - content: |- - {{if .IsCI}} - echo "CI mode" - {{else}} - echo "not CI mode" - {{end}} - ``` -* Improved environment value and options cast. Now you can use "NO", "Yes", true, false as bool too. - - -## Install - -To install this version, run the following commands (in a bash shell): - -``` -curl -fL https://github.com/bitrise-io/envman/releases/download/1.0.0/envman-$(uname -s)-$(uname -m) > /usr/local/bin/envman -``` - -Then: - -``` -chmod +x /usr/local/bin/envman -``` +* change 1 +* change 2