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

Add swift-nightly #1620

Merged
merged 2 commits into from
Mar 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions bucket/swift-nightly.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"version": "20240320.0",
"homepage": "https://www.swift.org/",
"description": "A general-purpose programming language built using a modern approach to safety, performance, and software design patterns.",
"license": "Apache-2.0",
"suggest": {
"python": "main/python",
"vcredist": "extras/vcredist2022"
},
"notes": [
"To make Swift toolchain work, you must have Visual Studio and Windows SDK components installed.",
"Read https://www.swift.org/getting-started/#support-files for Supporting Files installation guide."
],
"architecture": {
"64bit": {
"url": "https://github.com/thebrowsercompany/swift-build/releases/download/20240320.0/installer-amd64.exe#/swiftsetup.exe",
"hash": "c7467f5d969a09a23748125bdfa86504c4d7ec9d45e7adf991b7b8bf617589e6"
},
"arm64": {
"url": "https://github.com/thebrowsercompany/swift-build/releases/download/20240320.0/installer-arm64.exe#/swiftsetup.exe",
"hash": "7bdfb90bc28b7e19a7cca4c32da7f8664937bf663d002e3d665a030dd10f2987"
}
},
"pre_install": [
"Expand-DarkArchive \"$dir\\swiftsetup.exe\" \"$dir\\extract_folder\" -Removal",
"$xml = [xml](Get-Content -Raw \"$dir\\extract_folder\\UX\\manifest.xml\" -Encoding utf8)",
"$xml.BurnManifest.Payload | ForEach-Object {",
" Move-Item -Path \"$dir\\extract_folder\\AttachedContainer\\$($_.SourcePath)\" -Destination \"$dir\\extract_folder\\AttachedContainer\\$($_.FilePath)\"",
"}",
"$xml.BurnManifest.Payload | Where-Object { $_.FilePath.EndsWith(\".msi\") } | ForEach-Object {",
" if ($($_.FilePath) -eq \"rtl.msi\") {",
" Expand-MsiArchive \"$dir\\extract_folder\\AttachedContainer\\$($_.FilePath)\" \"$dir\\extract_folder\\LocalApp\\Programs\\Swift\\Runtimes\\usr\\bin\"",
" } else {",
" Expand-MsiArchive \"$dir\\extract_folder\\AttachedContainer\\$($_.FilePath)\" \"$dir\\extract_folder\"",
" }",
"}",
"$ver = \"0.0.0\"",
"Move-Item -Path \"$dir\\extract_folder\\LocalApp\\Programs\\Swift\" -Destination \"$dir\"",
"Move-Item -Path \"$dir\\Swift\\Platforms\\$ver\\Windows.platform\" -Destination \"$dir\\Swift\\Platforms\"",
"Move-Item -Path \"$dir\\Swift\\Toolchains\\$($ver)+Asserts\\usr\" -Destination \"$dir\\Swift\\Toolchains\"",
"# Move-Item -Path \"$dir\\Swift\\Tools\\$ver\\*\" -Destination \"$dir\\Swift\\Tools\"",
"Remove-Item \"$dir\\Swift\\Platforms\\$ver\" | Out-Null",
"Remove-Item \"$dir\\Swift\\Toolchains\\$ver+Asserts\" | Out-Null",
"# Remove-Item \"$dir\\Swift\\Tools\\$ver\" | Out-Null",
"Remove-Item \"$dir\\extract_folder\" -Recurse | Out-Null",
"Move-Item -Path \"$dir\\Swift\\*\" -Destination \"$dir\"",
"Remove-Item \"$dir\\Swift\" | Out-Null"
],
"env_add_path": [
"Runtimes\\usr\\bin",
"Toolchains\\usr\\bin",
"Tools"
Copy link
Member

Choose a reason for hiding this comment

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

Is it okay to leave Tools in the path if it doesn't exist?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah it works fine. Might be worth deleting though

],
"env_set": {
"SDKROOT": "$dir\\Platforms\\Windows.platform\\Developer\\SDKs\\Windows.sdk"
},
"checkver": {
"github": "https://github.com/thebrowsercompany/swift-build",
"regex": "(\\d{8}\\.\\d)"
},
"autoupdate": {
"architecture": {
"64bit": {
"url": "https://github.com/thebrowsercompany/swift-build/releases/download/$version/installer-amd64.exe#/swiftsetup.exe"
},
"arm64": {
"url": "https://github.com/thebrowsercompany/swift-build/releases/download/$version/installer-arm64.exe#/swiftsetup.exe"
}
}
}
}