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

(#3465) Allow building an MSI during outside of tagged commits. #3466

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

corbob
Copy link
Member

@corbob corbob commented Jun 13, 2024

Description Of Changes

Update the Recipe used to default to not build an MSI. Update the CI configurations to allow building the MSI with the addition of the --shouldBuildMsi=true parameter.

Motivation and Context

Ease the experience of making adjustments to the MSI. Allow us to get an MSI more regularly for testing.

Testing

  1. Ran ./build.bat --target=Build-Msi
  2. Noted that it failed to build as a previous task was skipped.
  3. Ran ./build.bat --target=Build-Msi --shouldBuildMsi=true
  4. Noted that it completed successfully.
  5. Checked the code_drop/Artifacts and code_drop/MSIs/en-US directories to confirm that an MSI was generated.
  6. Monitored the GHA for this PR to note that an MSI was generated.
  7. Monitored the Team City build for this PR to note that an MSI was not generated (because it's not a tagged build and the settings haven't been merged yet)

Operating Systems Testing

  • Windows 10

Change Types Made

  • Bug fix (non-breaking change).
  • Feature / Enhancement (non-breaking change).
  • Breaking change (fix or feature that could cause existing functionality to change).
  • Documentation changes.
  • PowerShell code changes.

Change Checklist

  • Requires a change to the documentation.
  • Documentation has been updated.
  • Tests to cover my changes, have been added.
  • All new and existing tests passed?
  • PowerShell code changes: PowerShell v2 compatibility checked?

Related Issue

Fixes #3465

Prepare-Chocolatey-Package previously would fail if not run as part of a
target that also included copying the nuspec files. This commit makes
the task dependency explicit so you can directly run
Prepare-Chocolatey-Package.
Changed the logic for skipping an MSI build to skip it by default, and
no longer depend on a tagged build. This will allow developers to
generate an MSI by adding `--shouldBuildMsi=true`.
When running the builds in CI, we should generate the MSI as well. This
will allow us to get an MSI for any build to test with if needed.
As with the previous commit, this adds the configuration for GitHub
Actions. Thus allowing us to ensure the MSI is able to be built in
GitHub Actions as well.

When running the builds in CI, we should generate the MSI as well. This
will allow us to get an MSI for any build to test with if needed.
@corbob
Copy link
Member Author

corbob commented Jun 13, 2024

Note: The MSI task in the GHA ran successfully, but Chocolatey.Cake.Recipe doesn't currently try to upload the MSI on GHA: https://github.com/chocolatey/Chocolatey.Cake.Recipe/blob/e4ac5d739a594f24d62c8502dfa4573da59f5267/Chocolatey.Cake.Recipe/Content/build.cake#L482

Copy link
Member Author

Choose a reason for hiding this comment

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

The line endings on this was not intentionally changed. I suspect it was the editorconfig that caused it here.

Copy link
Member

Choose a reason for hiding this comment

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

If that were the case, then why wouldn't this have changed before? What extension are you using in VSCode for EditorConfig?

Copy link
Member

Choose a reason for hiding this comment

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

I am not against there being changes to line-endings, if they are indeed intended based on our .editorconfig settings, but this change would need to be done in a separate commit.

Copy link
Member Author

Choose a reason for hiding this comment

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

The extension I have installed in VSCode is:

Name: EditorConfig for VS Code
Id: EditorConfig.EditorConfig
Description: EditorConfig Support for Visual Studio Code
Version: 0.16.4
Publisher: EditorConfig
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig

It is affected by the setting of CRLF for all files in .editorconfig. I'll get a commit sorted out to convert the file to CRLF and get that pushed up.

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.

Add the ability to create an MSI on non-tagged builds
2 participants