Skip to content

Add --preset-vars-file to build-script for easier preset vars handling #76058

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

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

MaxDesiatov
Copy link
Contributor

It's not always convenient to pass preset substitution arguments on an interactive command-line. Sometimes one might also need to generate these vars automatically, outside of a build-script invocation and also store those vars in a file for later reuse.

This change adds a new optional --preset-vars-file customization point to build-script, which allows users to pass a a file with newline separated key-value pars for preset variables substitution in addition to passing those in a direct build-script invocation.

@MaxDesiatov MaxDesiatov added the build-script Area → utils: The build script label Aug 23, 2024
@MaxDesiatov
Copy link
Contributor Author

@swift-ci smoke test

@MaxDesiatov
Copy link
Contributor Author

@swift-ci build toolchain

@MaxDesiatov
Copy link
Contributor Author

@swift-ci smoke test macos

@MaxDesiatov MaxDesiatov marked this pull request as ready for review August 23, 2024 16:54
@MaxDesiatov
Copy link
Contributor Author

macOS toolchain failure is unrelated

@MaxDesiatov
Copy link
Contributor Author

@swift-ci build toolchain macos

@MaxDesiatov
Copy link
Contributor Author

@swift-ci build toolchain macos

@MaxDesiatov MaxDesiatov merged commit 6c99946 into main Aug 27, 2024
6 checks passed
@MaxDesiatov MaxDesiatov deleted the maxd/preset-vars-file branch August 27, 2024 08:57
andrurogerz pushed a commit to andrurogerz/swift that referenced this pull request Sep 3, 2024
…dling (swiftlang#76058)

It's not always convenient to pass preset substitution arguments on an interactive command-line. Sometimes one might also need to generate these vars automatically, outside of a `build-script` invocation and also store those vars in a file for later reuse.

This change adds a new optional `--preset-vars-file` customization point to `build-script`, which allows users to pass a a file with newline separated key-value pars for preset variables substitution in addition to passing those in a direct `build-script` invocation.
MaxDesiatov added a commit that referenced this pull request Dec 18, 2024
Currently, usage of `--preset-vars-file` (added in #76058) introduces newlines in values of preset variables passed via this file. Calling `strip()` will remove trailing and preceding whitespace characters, including newlines.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-script Area → utils: The build script
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants