Repository: chanzuckerberg/fogg
Pull request #387 (2019-12-13 22:57:03)

[fix] ensure we always download the right version of fogg
I am somewhat surprised that this hasn't been causing us trouble.

### Test Plan
* unit tests

### References



codecov[bot]: # [Codecov](https://codecov.io/gh/chanzuckerberg/fogg/pull/387?src=pr&el=h1) Report
> Merging [#387](https://codecov.io/gh/chanzuckerberg/fogg/pull/387?src=pr&el=desc) into [master](https://codecov.io/gh/chanzuckerberg/fogg/commit/d3563d12ac5178af72f6832340f51167fcf42ce5?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/chanzuckerberg/fogg/pull/387/graphs/tree.svg?width=650&token=57DhtZ7g2A&height=150&src=pr)](https://codecov.io/gh/chanzuckerberg/fogg/pull/387?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master     #387   +/-   ##
=======================================
  Coverage   79.04%   79.04%           
=======================================
  Files          25       25           
  Lines        2009     2009           
=======================================
  Hits         1588     1588           
  Misses        278      278           
  Partials      143      143
```



------

[Continue to review full report at Codecov](https://codecov.io/gh/chanzuckerberg/fogg/pull/387?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/chanzuckerberg/fogg/pull/387?src=pr&el=footer). Last update [d3563d1...9c000f6](https://codecov.io/gh/chanzuckerberg/fogg/pull/387?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Patch:
diff --git a/templates/repo/Makefile.tmpl b/templates/repo/Makefile.tmpl
index df0c6bae..42c63166 100644
--- a/templates/repo/Makefile.tmpl
+++ b/templates/repo/Makefile.tmpl
@@ -10,7 +10,7 @@ ACCOUNTS={{ .Accounts | dict | keys | sortAlpha | join " "}}
 all: check
 
 setup: ## set up working directory by installing dependencies
-	curl -s https://raw.githubusercontent.com/chanzuckerberg/fogg/master/download.sh | bash -s -- -b .fogg/bin $(FOGG_VERSION)
+	curl -s https://raw.githubusercontent.com/chanzuckerberg/fogg/master/download.sh | bash -s -- -b .fogg/bin {{.Version}}
 	.fogg/bin/fogg setup
 .PHONY: setup
 
@@ -139,4 +139,4 @@ clean-global: ## clean in terraform/global
 	$(MAKE) -C terraform/global clean || exit $$?
 .PHONY: clean-global
 
-{{ template "make_help"  }}
\ No newline at end of file
+{{ template "make_help"  }}


Test patch:
diff --git a/testdata/bless_provider/Makefile b/testdata/bless_provider/Makefile
index fb1a3bf3..44a77de6 100644
--- a/testdata/bless_provider/Makefile
+++ b/testdata/bless_provider/Makefile
@@ -10,7 +10,7 @@ ACCOUNTS=foo
 all: check
 
 setup: ## set up working directory by installing dependencies
-	curl -s https://raw.githubusercontent.com/chanzuckerberg/fogg/master/download.sh | bash -s -- -b .fogg/bin $(FOGG_VERSION)
+	curl -s https://raw.githubusercontent.com/chanzuckerberg/fogg/master/download.sh | bash -s -- -b .fogg/bin undefined+undefined+dirty
 	.fogg/bin/fogg setup
 .PHONY: setup
 
@@ -143,3 +143,4 @@ clean-global: ## clean in terraform/global
 help: ## display help for this makefile
 	@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
 .PHONY: help
+
diff --git a/testdata/github_provider/Makefile b/testdata/github_provider/Makefile
index fb1a3bf3..44a77de6 100644
--- a/testdata/github_provider/Makefile
+++ b/testdata/github_provider/Makefile
@@ -10,7 +10,7 @@ ACCOUNTS=foo
 all: check
 
 setup: ## set up working directory by installing dependencies
-	curl -s https://raw.githubusercontent.com/chanzuckerberg/fogg/master/download.sh | bash -s -- -b .fogg/bin $(FOGG_VERSION)
+	curl -s https://raw.githubusercontent.com/chanzuckerberg/fogg/master/download.sh | bash -s -- -b .fogg/bin undefined+undefined+dirty
 	.fogg/bin/fogg setup
 .PHONY: setup
 
@@ -143,3 +143,4 @@ clean-global: ## clean in terraform/global
 help: ## display help for this makefile
 	@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
 .PHONY: help
+
diff --git a/testdata/okta_provider/Makefile b/testdata/okta_provider/Makefile
index fb1a3bf3..44a77de6 100644
--- a/testdata/okta_provider/Makefile
+++ b/testdata/okta_provider/Makefile
@@ -10,7 +10,7 @@ ACCOUNTS=foo
 all: check
 
 setup: ## set up working directory by installing dependencies
-	curl -s https://raw.githubusercontent.com/chanzuckerberg/fogg/master/download.sh | bash -s -- -b .fogg/bin $(FOGG_VERSION)
+	curl -s https://raw.githubusercontent.com/chanzuckerberg/fogg/master/download.sh | bash -s -- -b .fogg/bin undefined+undefined+dirty
 	.fogg/bin/fogg setup
 .PHONY: setup
 
@@ -143,3 +143,4 @@ clean-global: ## clean in terraform/global
 help: ## display help for this makefile
 	@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
 .PHONY: help
+
diff --git a/testdata/snowflake_provider/Makefile b/testdata/snowflake_provider/Makefile
index fb1a3bf3..44a77de6 100644
--- a/testdata/snowflake_provider/Makefile
+++ b/testdata/snowflake_provider/Makefile
@@ -10,7 +10,7 @@ ACCOUNTS=foo
 all: check
 
 setup: ## set up working directory by installing dependencies
-	curl -s https://raw.githubusercontent.com/chanzuckerberg/fogg/master/download.sh | bash -s -- -b .fogg/bin $(FOGG_VERSION)
+	curl -s https://raw.githubusercontent.com/chanzuckerberg/fogg/master/download.sh | bash -s -- -b .fogg/bin undefined+undefined+dirty
 	.fogg/bin/fogg setup
 .PHONY: setup
 
@@ -143,3 +143,4 @@ clean-global: ## clean in terraform/global
 help: ## display help for this makefile
 	@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
 .PHONY: help
+
diff --git a/testdata/v1_full/Makefile b/testdata/v1_full/Makefile
index 24ec4e4d..bcc24eff 100644
--- a/testdata/v1_full/Makefile
+++ b/testdata/v1_full/Makefile
@@ -10,7 +10,7 @@ ACCOUNTS=bar foo
 all: check
 
 setup: ## set up working directory by installing dependencies
-	curl -s https://raw.githubusercontent.com/chanzuckerberg/fogg/master/download.sh | bash -s -- -b .fogg/bin $(FOGG_VERSION)
+	curl -s https://raw.githubusercontent.com/chanzuckerberg/fogg/master/download.sh | bash -s -- -b .fogg/bin undefined+undefined+dirty
 	.fogg/bin/fogg setup
 .PHONY: setup
 
@@ -143,3 +143,4 @@ clean-global: ## clean in terraform/global
 help: ## display help for this makefile
 	@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
 .PHONY: help
+
diff --git a/testdata/v2_full/Makefile b/testdata/v2_full/Makefile
index e5b1b2db..77ca71a8 100644
--- a/testdata/v2_full/Makefile
+++ b/testdata/v2_full/Makefile
@@ -10,7 +10,7 @@ ACCOUNTS=bar foo
 all: check
 
 setup: ## set up working directory by installing dependencies
-	curl -s https://raw.githubusercontent.com/chanzuckerberg/fogg/master/download.sh | bash -s -- -b .fogg/bin $(FOGG_VERSION)
+	curl -s https://raw.githubusercontent.com/chanzuckerberg/fogg/master/download.sh | bash -s -- -b .fogg/bin undefined+undefined+dirty
 	.fogg/bin/fogg setup
 .PHONY: setup
 
@@ -143,3 +143,4 @@ clean-global: ## clean in terraform/global
 help: ## display help for this makefile
 	@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
 .PHONY: help
+
diff --git a/testdata/v2_minimal_valid/Makefile b/testdata/v2_minimal_valid/Makefile
index e1e0df9e..699d91d0 100644
--- a/testdata/v2_minimal_valid/Makefile
+++ b/testdata/v2_minimal_valid/Makefile
@@ -10,7 +10,7 @@ ACCOUNTS=
 all: check
 
 setup: ## set up working directory by installing dependencies
-	curl -s https://raw.githubusercontent.com/chanzuckerberg/fogg/master/download.sh | bash -s -- -b .fogg/bin $(FOGG_VERSION)
+	curl -s https://raw.githubusercontent.com/chanzuckerberg/fogg/master/download.sh | bash -s -- -b .fogg/bin undefined+undefined+dirty
 	.fogg/bin/fogg setup
 .PHONY: setup
 
@@ -143,3 +143,4 @@ clean-global: ## clean in terraform/global
 help: ## display help for this makefile
 	@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
 .PHONY: help
+
diff --git a/testdata/v2_no_aws_provider/Makefile b/testdata/v2_no_aws_provider/Makefile
index e5b1b2db..77ca71a8 100644
--- a/testdata/v2_no_aws_provider/Makefile
+++ b/testdata/v2_no_aws_provider/Makefile
@@ -10,7 +10,7 @@ ACCOUNTS=bar foo
 all: check
 
 setup: ## set up working directory by installing dependencies
-	curl -s https://raw.githubusercontent.com/chanzuckerberg/fogg/master/download.sh | bash -s -- -b .fogg/bin $(FOGG_VERSION)
+	curl -s https://raw.githubusercontent.com/chanzuckerberg/fogg/master/download.sh | bash -s -- -b .fogg/bin undefined+undefined+dirty
 	.fogg/bin/fogg setup
 .PHONY: setup
 
@@ -143,3 +143,4 @@ clean-global: ## clean in terraform/global
 help: ## display help for this makefile
 	@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
 .PHONY: help
+