Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add option pulumi-version-file #1204

Merged
merged 3 commits into from
Jun 25, 2024
Merged

Conversation

corymhall
Copy link
Contributor

Similar to how Setup
Node
action works, this adds a new pulumi-version-file option that allows users to specify a file to read the version from.

A lot of our providers use the .pulumi.version file to store the current version of pulumi and we want to be able to use that version rather than relying on what is already installed.

re pulumi/ci-mgmt#990

Similar to how [Setup
Node](https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md?rgh-link-date=2024-06-24T19%3A12%3A42Z#node-version-file)
action works, this adds a new `pulumi-version-file` option that allows
users to specify a file to read the version from.

A lot of our providers use the `.pulumi.version` file to store the
current version of pulumi and we want to be able to use that version
rather than relying on what is already installed.

re pulumi/ci-mgmt#990
@corymhall corymhall requested a review from a team as a code owner June 24, 2024 20:05
Copy link
Member

@danielrbradley danielrbradley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it!

Copy link
Contributor

@tgummerer tgummerer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to document this option in the readme as well?

src/config.ts Outdated
@@ -22,9 +23,20 @@ export const installationConfig = rt.Record({
export type InstallationConfig = rt.Static<typeof installationConfig>;

export function makeInstallationConfig(): rt.Result<InstallationConfig> {
let pulumiVersion = getInput('pulumi-version') || '^3';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we error out early if both pulumi-version and pulumi-version-file are given?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call! I'll update it.

@corymhall corymhall changed the title Add option pulumi-version-file feat: add option pulumi-version-file Jun 25, 2024
Copy link
Contributor

@tgummerer tgummerer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thank you!

@corymhall corymhall merged commit 1e13f23 into main Jun 25, 2024
76 checks passed
@corymhall corymhall deleted the corymhall/pulumi-version-file branch June 25, 2024 14:26
corymhall added a commit that referenced this pull request Jun 25, 2024
Update the changelog for a minor release including #1204
corymhall added a commit that referenced this pull request Jun 25, 2024
Update the changelog for a minor release including #1204
@corymhall corymhall self-assigned this Jun 25, 2024
tgummerer added a commit that referenced this pull request Jul 3, 2024
The pulumi-version-file option was introduced in
#1204.  However it was only
introduced for installation mode, not if a pulumi command is given.
The latter has separate config parsing code, so let's introduce the
same option there as well.
tgummerer added a commit that referenced this pull request Jul 11, 2024
* make pulumi-version-file also work in non-install mode

The pulumi-version-file option was introduced in
#1204.  However it was only
introduced for installation mode, not if a pulumi command is given.
The latter has separate config parsing code, so let's introduce the
same option there as well.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants