You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The canonical name format was chosen to reduce the keystrokes needed to refer to a snapshot toolchain, but the longer form is also useful when copy/pasting a toolchain name provided from somewhere else.
274
274
275
-
### Specifying a GitHub access token
276
-
277
-
swiftly currently uses the GitHub API to look up the available Swift toolchains. To avoid running up against rate limits, you can provide a [GitHub access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) via the `--token` option (the token doesn't need any permissions):
@@ -298,7 +291,7 @@ Swift.org currently provides experimental [`.rpm` and `.deb`](https://forums.swi
298
291
299
292
swiftenv is an existing Swift version manager which already has much of the functionality that swiftly will eventually have. It's an awesome tool, and if it's part of your workflow then we encourage you to keep using it! That said, swiftly is/will be different a few ways:
300
293
301
-
- swiftly is being built as a community driven effort led by the Swift server workgroup, and through this collaboration, swiftly will eventually become an official installation tool for Swift toolchains. As first step towards that, swiftly will help inform the creation of API endpoints maintained by the Swift project that it will use to retrieve information about what toolchains are available to install and to verify their expected signatures. swiftenv currently uses a third party API layer for this. Using an official API reduces the avenues for security vulnerabilities and also reduces the risk of downtime affecting Swift installations. Note that this is planned for the future--swiftly currently uses the GitHub API for this purpose.
294
+
- swiftly is being built as a community driven effort led by the Swift server workgroup, and through this collaboration, swiftly will eventually become an official installation tool for Swift toolchains. As first step towards that, swiftly will help inform the creation of API endpoints maintained by the Swift project that it will use to retrieve information about what toolchains are available to install and to verify their expected signatures. swiftenv currently uses a third party API layer for this. Using an official API reduces the avenues for security vulnerabilities and also reduces the risk of downtime affecting Swift installations.
302
295
303
296
- swiftly will be written in Swift, which we think is important for maintainability and encouraging community contributions.
Copy file name to clipboardExpand all lines: RELEASING.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ Swift has a tool for producing final product packages, suitable for distribution
13
13
5. Create a tag on that commit with the format "x.y.z". Do not omit "z", even if its value is 0.
14
14
15
15
6. Build the executables for the release by running `swift run build-swiftly-release <version>` from the root of the swiftly repository
16
-
* Build on a Apple silicon macOS machine to produce a universal package for x86_64 and arm64
16
+
* Build on an Apple macOS machine to produce a universal package for x86_64 and arm64 (add the --cert option to provide a signing certificate file for the .pkg)
SwiftlyCore.print("Fetching the latest \(branch) branch snapshot...")
258
+
269
259
// If a date was not provided, perform a lookup to find the most recent snapshot
270
260
// for the given branch.
271
-
letsnapshot=tryawaitSwiftlyCore.httpClient.getSnapshotToolchains(platform: config.platform, branch: branch, limit:1){ snapshot in
272
-
snapshot.branch == branch
273
-
}.first
261
+
letsnapshots:[ToolchainVersion.Snapshot]
262
+
do{
263
+
snapshots =tryawaitSwiftlyCore.httpClient.getSnapshotToolchains(platform: config.platform, branch: branch, limit:1){ snapshot in
264
+
snapshot.branch == branch
265
+
}
266
+
}catchlet branchNotFoundErr as SwiftlyHTTPClient.SnapshotBranchNotFoundError{
267
+
throwError(message:"You have requested to install a snapshot toolchain from branch \(branchNotFoundErr.branch). It cannot be found on swift.org. Note that snapshots are only available from the current `main` release and the latest x.y (major.minor) release. Try again with a different branch.")
268
+
}catch{
269
+
throw error
270
+
}
271
+
272
+
letfirstSnapshot= snapshots.first
274
273
275
-
guardletsnapshotelse{
274
+
guardletfirstSnapshotelse{
276
275
throwError(message:"No snapshot toolchain found for branch \(branch)")
}catchlet branchNotFoundError as SwiftlyHTTPClient.SnapshotBranchNotFoundError{
57
+
throwError(message:"The snapshot branch \(branchNotFoundError.branch) was not found on swift.org. Note that snapshot toolchains are only available for the current `main` release and the previous x.y (major.minor) release.")
}catchlet branchNotFoundErr as SwiftlyHTTPClient.SnapshotBranchNotFoundError{
204
+
throwError(message:"Snapshot branch \(branchNotFoundErr.branch) cannot be updated. One possible reason for this is that there has been a new release published to swift.org and this snapshot is for an older release. Snapshots are only available for the newest release and the main branch. You can install a fresh snapshot toolchain from the either the latest release x.y (major.minor) with `swiftly install x.y-snapshot` or from the main branch with `swiftly install main-snapshot`.")
0 commit comments