mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-16 19:52:49 -06:00
bd68789006
Instead of using a hardcoded version prerelease string, which makes release automation difficult, set the version prerelease string from an environment variable via the go linker tool during compile time. The environment variable `TF_RELEASE` should only be set via the `make bin` target, and thus leaves the version prerelease string unset. Otherwise, when running a local compile of terraform via the `make dev` makefile target, the version prerelease string is set to `"dev"`, as usual. This also requires some changes to both the circonus and postgresql providers, as they directly used the `VersionPrerelease` constant. We now simply call the `VersionString()` function, which returns the proper interpolated version string with the prerelease string populated correctly. `TF_RELEASE` is unset: ```sh $ make dev ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /terraform/vendor/) 2017/05/22 10:38:19 Generated command/internal_plugin_list.go ==> Removing old directory... ==> Building... Number of parallel builds: 3 --> linux/amd64: github.com/hashicorp/terraform ==> Results: total 209M -rwxr-xr-x 1 jake jake 209M May 22 10:39 terraform $ terraform version Terraform v0.9.6-dev (fd472e4a86500606b03c314f70d11f2bc4bc84e5+CHANGES) ``` `TF_RELEASE` is set (mimicking the `make bin` target): ```sh $ TF_RELEASE=1 make dev ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /terraform/vendor/) 2017/05/22 10:40:39 Generated command/internal_plugin_list.go ==> Removing old directory... ==> Building... Number of parallel builds: 3 --> linux/amd64: github.com/hashicorp/terraform ==> Results: total 121M -rwxr-xr-x 1 jake jake 121M May 22 10:42 terraform $ terraform version Terraform v0.9.6 ``` |
||
---|---|---|
.. | ||
check.go | ||
consts.go | ||
data_source_circonus_account_test.go | ||
data_source_circonus_account.go | ||
data_source_circonus_collector_test.go | ||
data_source_circonus_collector.go | ||
GNUmakefile | ||
interface.go | ||
metric_cluster.go | ||
metric_test.go | ||
metric.go | ||
provider_test.go | ||
provider.go | ||
resource_circonus_check_caql_test.go | ||
resource_circonus_check_caql.go | ||
resource_circonus_check_cloudwatch_test.go | ||
resource_circonus_check_cloudwatch.go | ||
resource_circonus_check_consul_test.go | ||
resource_circonus_check_consul.go | ||
resource_circonus_check_http_test.go | ||
resource_circonus_check_http.go | ||
resource_circonus_check_httptrap_test.go | ||
resource_circonus_check_httptrap.go | ||
resource_circonus_check_icmp_ping_test.go | ||
resource_circonus_check_icmp_ping.go | ||
resource_circonus_check_json_test.go | ||
resource_circonus_check_json.go | ||
resource_circonus_check_mysql_test.go | ||
resource_circonus_check_mysql.go | ||
resource_circonus_check_postgresql_test.go | ||
resource_circonus_check_postgresql.go | ||
resource_circonus_check_statsd_test.go | ||
resource_circonus_check_statsd.go | ||
resource_circonus_check_tcp_test.go | ||
resource_circonus_check_tcp.go | ||
resource_circonus_check_test.go | ||
resource_circonus_check.go | ||
resource_circonus_contact_test.go | ||
resource_circonus_contact.go | ||
resource_circonus_graph_test.go | ||
resource_circonus_graph.go | ||
resource_circonus_metric_cluster_test.go | ||
resource_circonus_metric_cluster.go | ||
resource_circonus_metric_test.go | ||
resource_circonus_metric.go | ||
resource_circonus_rule_set_test.go | ||
resource_circonus_rule_set.go | ||
tags.go | ||
types.go | ||
utils.go | ||
validators.go |