pulumi/scripts
Paul Stack 1d3c9edb6c
Ensure that make brew works as expected rather than passing empty version (#6566)
Fixes:#6565

As part of #6460, the logic for determing the version of the build was
moved to be a dependency on pulumictl.

Unfortunately, the homebrew installs use the "make dist" command to
build + install Pulumi to the user maching and as that would have a
dependency on pulumictl and it not existing on the user machine, it
would pass an empty version to the ldflag

This then manifested to the user as:

```
▶ pulumi version
warning: A new version of Pulumi is available. To upgrade from version '0.0.0' to '2.22.0', run
   $ brew upgrade pulumi
or visit https://pulumi.com/docs/reference/install/ for manual instructions and release notes.
```

We are able to mitigate this behaviour by bringing back the get-version
script and using that script as part of the make brew installation

We can see that the versions are the same between the 2 different
installation techniques

```
make dist <------- uses pulumict
DIST:
go install -ldflags "-X github.com/pulumi/pulumi/sdk/v2/go/common/version.Version=2.24.0-alpha.1616029310+787eb70a" github.com/pulumi/pulumi/sdk/v2/dotnet/cmd/pulumi-language-dotnet
DIST:
BUILD:
```

```
make brew <----- uses the legacy script
▶ make brew
BREW:
go install -ldflags "-X github.com/pulumi/pulumi/sdk/v2/go/common/version.Version=v2.24.0-alpha.1616029310+g787eb70a2" github.com/pulumi/pulumi/sdk/v2/dotnet/cmd/pulumi-language-dotnet
BREW:
```

A full post mortem will be carried out to ensure we mitigate these
types of errors going forward and that we are able to better test
these types of situations
2021-03-18 02:07:02 +00:00
..
build-sdk.cmd Use newer versions of the build-sdk.sh scripts 2018-04-30 20:44:01 -07:00
build-sdk.ps1 Publish SDK binaries with same filename format as NPM packages 2018-11-21 14:38:24 -08:00
build-sdk.sh Remove references to Pulumi private clouds (#2095) 2018-10-24 13:50:35 -07:00
get-version Ensure that make brew works as expected rather than passing empty version (#6566) 2021-03-18 02:07:02 +00:00
make_release.ps1 Updating pulumictl usage in windows build 2021-03-10 22:47:50 +00:00
make_release.sh Migrate the version calculation to use pulumictl (#6460) 2021-03-10 19:03:29 +00:00
prep-for-goreleaser.sh jaxxstorm/build fixes (#5483) 2020-10-08 12:43:38 -07:00
publish.cmd Build, integration tests and publishing on Windows 2017-10-02 13:40:58 -07:00
publish.ps1 Updating pulumictl usage in windows build release script 2021-03-10 23:17:08 +00:00
publish_npm.sh Ensure nightly and master builds with an alpha build version are tagged dev (#6231) 2021-02-01 19:37:53 +00:00
publish_packages.sh Migrate the version calculation to use pulumictl (#6460) 2021-03-10 19:03:29 +00:00
publish_tgz.sh Only publish some artifacts from a single Linux leg 2019-01-15 10:42:28 -08:00
reversion.js Substitute ${VERSION} on Windows builds too 2018-02-20 14:37:28 -08:00
test-containers.sh Ensure that testing containers happens as part of a pulumi publish event (#6030) 2021-01-04 18:28:13 +00:00