--- a/ChangeLog Mon Feb 12 22:47:46 2018 -0600
+++ b/ChangeLog Mon Feb 12 22:59:02 2018 -0600
@@ -12,6 +12,8 @@
* Command line arguments were not being passed to the command line in a
secure manner. You couldn't run a shell command, but you could break the
+ * Add copies of all VCS environment variables without their prefix as well as + a VCS environment variable. Fixed #164 * Write warning, error, and fatal log messages to stderr. Fixed #156
--- a/environment/environment.go Mon Feb 12 22:47:46 2018 -0600
+++ b/environment/environment.go Mon Feb 12 22:59:02 2018 -0600
@@ -23,6 +23,7 @@
"bitbucket.org/rw_grim/govcs"
+ "bitbucket.org/rw_grim/govcs/hg" "bitbucket.org/rw_grim/convey/normalize"
@@ -42,16 +43,32 @@
name := strings.ToUpper(repo.Name())
+ addEnv("COMMIT", repo.Commit()), + addEnv("COMMIT_SHORT", repo.ShortCommit()), + addEnv("COMMIT", repo.Commit()), + addEnv("BRANCH", repo.Branch()), + addEnv("BRANCH_NORMALIZED", normalize.Normalize(repo.Branch())), + addEnv("REMOTE", repo.Remote("")), addEnv(name+"_COMMIT", repo.Commit()),
addEnv(name+"_COMMIT_SHORT", repo.ShortCommit()),
addEnv(name+"_COMMIT", repo.Commit()),
addEnv(name+"_BRANCH", repo.Branch()),
addEnv(name+"_BRANCH_NORMALIZED", normalize.Normalize(repo.Branch())),
addEnv(name+"_REMOTE", repo.Remote("")),
+ // check for vcs specific values. If this grows past 1, make it a switch + if hg, ok := repo.(*hg.Mercurial); ok { + addEnv("BOOKMARK", hg.Bookmark()), + addEnv(name+"_BOOKMARK", hg.Bookmark()),