Skip to content

Conversation

smaillet
Copy link
Member

@smaillet smaillet commented Jun 4, 2025

Updated test access to build environment information.
Tests need access to the information about the environment to determine the correct versioning for a build. Normally, this is available in the Environment variables but test runs DO NOT get an inherited set of environment variables from the command that launched them.

  • Added forcing CI info to blank in the task's props file
  • Added setting of the environment variables with IDisposable RAII pattern to clean up afterwards when validating the as-built task assembly.
  • Added [Start|End]-FakeReleaseBuild.ps1 scripts to aid in replicating a release build environment locally.
  • Added BuildKind to the generatedVersion.props file to allow "communication" of the environment variables that existed at time of the task assembly build.

Tests need access to the information about the environment to determine the correct versioning for a build. Normally, this is available in the Environment variables but test runs DO NOT get an inherited set of environment variables from the command that launched them.

* Added forcing CI info to blank in the task's props file
* Added setting of the environment variables with IDisposable RAII pattern to clean up afterwards when validating the as-built task assembly.
* Added [Start|End]-FakeReleaseBuild.ps1 scripts to aid in replicating a release build environment locally.
* Added BuildKind to the generatedVersion.props file to allow "communication" of the environment variables that existed at time of the task assembly build.
@smaillet smaillet merged commit 02d2e89 into UbiquityDotNET:release/v5.0.0-rc Jun 4, 2025
@smaillet smaillet deleted the FixReleaseEnvVarsInTests branch June 4, 2025 19:20
smaillet added a commit that referenced this pull request Jun 4, 2025
* Updating build version information to a release candidate (#29)

Co-authored-by: smaillet <[email protected]>

* Fixed release build scripts (#31)

* Publish release now resets the branch if it exists
* Fixed generation of version info to not include CI information for a release build as it will be null

Co-authored-by: smaillet <[email protected]>

* Updated test access to build environment information. (#32)

Tests need access to the information about the environment to determine the correct versioning for a build. Normally, this is available in the Environment variables but test runs DO NOT get an inherited set of environment variables from the command that launched them.

* Added forcing CI info to blank in the task's props file
* Added setting of the environment variables with IDisposable RAII pattern to clean up afterwards when validating the as-built task assembly.
* Added [Start|End]-FakeReleaseBuild.ps1 scripts to aid in replicating a release build environment locally.
* Added BuildKind to the generatedVersion.props file to allow "communication" of the environment variables that existed at time of the task assembly build.

Co-authored-by: smaillet <[email protected]>

* Update release-build.yml

Removed upload of test results using custom action as there's no PR/COMIT to publish to for a release build. Instead, just uploads the TRX files.

* Updated GIT URL to remove ".git"

* Added missing Build-docs to GH Action

* Updated release script for nuget push
* Simplified command to push packages
* Added support to create a release in GH even if the push fails.
    - It seems it works for local commands so downloading the resulting packages is a workable option until this is all figured out.

* Adjusted testing of existing CI information for CI builds to work with updated release support.

* Added support to read repo BuildVersion.xml to get minimum packge version

---------

Co-authored-by: smaillet <[email protected]>
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.

1 participant