Skip to content

Conversation

cmcgee1024
Copy link
Member

@cmcgee1024 cmcgee1024 commented Apr 25, 2025

Model the pkgbuild command with the usual structure used for other commands.

Provide a custom string convertible implementation for configuration so that the
configuration can be easily converted into a string for logging and comparison
purposes.

Create a runEcho() implementation for the build swiftly release script so that
commands can output their command-line to the log for reproducibility.

Add a model for the Linux getent command. Provide a convenience entries() method
that provides a table of the entries for better ease of use.

Model a small subset of the git command for use in the build swiftly release script and
testing of it.

Model the pkgbuild command with the usual structure used for other
commands.

Provide a custom string convertible implementation for configuration
so that the configuration can be easily converted into a string for
logging and comparison purposes.

Create a runEcho() implementation for the build swiftly release
script so that commands can output their command-line to the log
for reproducibility.
@cmcgee1024
Copy link
Member Author

@swift-ci test macOS

@cmcgee1024 cmcgee1024 changed the title Model the pkgbuild command Model additional system commands Apr 25, 2025
@cmcgee1024
Copy link
Member Author

@swift-ci test macOS

@cmcgee1024
Copy link
Member Author

@swift-ci test macOS

@cmcgee1024 cmcgee1024 marked this pull request as ready for review April 25, 2025 18:37
var args: [String] = []

for option in self.options {
args += option.args()
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: favour .append(contentsOf:) over += here, as .append is a more specialized implementation that won't create an intermediate array.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, I've replaced them all with an equivalent append method.

extension Arguments: CustomStringConvertible {
public var description: String {
let normalized: [String] = self.storage.map(\.description).map {
if $0.contains(" ") {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: could be shortened to a ternary

Copy link
Member Author

Choose a reason for hiding this comment

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

Done, thanks for the suggestion.

Replace if with ternary expression
@cmcgee1024
Copy link
Member Author

@swift-ci test macOS

@cmcgee1024 cmcgee1024 merged commit ce59935 into swiftlang:main Apr 30, 2025
23 checks passed
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.

2 participants