chocolatey / chocolatey/choco

Update Build scripts to call the base script.

Open
#3,483 0 comments 0 reactions 0 assignees View on GitHub
0 - Triaging Build Automation
Dominant language
C#
Stars
11.5k
Forks
960
PR merge metrics
No merged PRs in 30d

Description

### Checklist

- [X] I have verified this is the correct repository for opening this issue.
- [X] I have verified no other issues exist related to my request.

### Is Your Feature Request Related To A Problem? Please describe.

_No response_

### Describe The Solution. Why is it needed?

When using the `build.debug.bat` and `build.official.bat` file, they are mirrors of `build.bat` with the addition of the desired `-Configuration ` parameter. They also then leave off the configuration as being provided to the Cake build script, when in fact it is. This presents two concerns for our future selves: First: if the method of launching the `build.ps1` needs to change (say setting an environment variable first), we need to make the change in all of the build scripts. Second: as it stands, the build.sh variants diverge from the build.bat in that they all call the build.sh while the build.bat variants duplicate the build.bat.

Proposal is to update the debug and official scripts to just call the build.bat with the desired configuration.

### Additional Context

We will want to ensure that a failing build returns the exit code correctly. This can be done by purposely breaking the build and running each build.bat script and then inspecting the exit code.

### Related Issues

_No response_

Contributor guide

Open the contributing guide

Research direction

Compare build.debug.bat and build.official.bat with build.bat, then review the build.ps1 invocation and the build.sh variants for consistency. Update the debug and official scripts to call build.bat with their configurations, then purposely break the build and run each build.bat script to verify the failure exit code is preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell, shell
Domain
build-system
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.