Skip to content

Commit

Permalink
build(swift-org-website): bump swiftorg from 332574c to 8485bd3 (#…
Browse files Browse the repository at this point in the history
…121)

* build(swift-org-website): bump swiftorg from `332574c` to `8485bd3`

Bumps [swiftorg](https://github.com/apple/swift-org-website) from `332574c` to `8485bd3`.
- [Commits](swiftlang/swift-org-website@332574c...8485bd3)

---
updated-dependencies:
- dependency-name: swiftorg
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* [skip dependabot] wip: update package.json

* fix: fixed installation failure for windows toolchain
when gpg signature is missing

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: swiftylab-ci <swiftylab.bot@gmail.com>
Co-authored-by: Soumya Ranjan Mahunt <soumya.mahunt@gmail.com>
  • Loading branch information
3 people authored Oct 25, 2023
1 parent 6c4f4b0 commit 3dc4e02
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 19 deletions.
23 changes: 21 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
"license": "MIT",
"homepage": "https://github.com/SwiftyLab/setup-swift#readme",
"swiftorg": {
"commit": "332574c8459304994580ac67605a8891d01da580",
"commit": "8485bd396d05e3a021c9b905d4f48ba204d1f589",
"release": {
"name": 5.9,
"tag": "swift-5.9-RELEASE",
"name": "5.9.1",
"tag": "swift-5.9.1-RELEASE",
"xcode": "Xcode 15",
"xcode_release": true,
"date": "2023-09-18T00:00:00.000Z",
"xcode_release": false,
"date": "2023-10-19T00:00:00.000Z",
"platforms": [
{
"name": "Ubuntu 18.04",
Expand All @@ -24,38 +24,38 @@
},
{
"name": "Ubuntu 20.04",
"docker": "5.9-focal",
"docker": "5.9.1-focal",
"archs": [
"x86_64",
"aarch64"
]
},
{
"name": "Ubuntu 22.04",
"docker": "5.9-jammy",
"docker": "5.9.1-jammy",
"archs": [
"x86_64",
"aarch64"
]
},
{
"name": "CentOS 7",
"docker": "5.9-centos7",
"docker": "5.9.1-centos7",
"archs": [
"x86_64"
]
},
{
"name": "Amazon Linux 2",
"docker": "5.9-amazonlinux2",
"docker": "5.9.1-amazonlinux2",
"archs": [
"x86_64",
"aarch64"
]
},
{
"name": "Red Hat Universal Base Image 9",
"docker": "5.9-rhel-ubi9",
"docker": "5.9.1-rhel-ubi9",
"dir": "ubi9",
"archs": [
"x86_64",
Expand All @@ -72,12 +72,12 @@
},
"dev": {
"name": "5.10",
"date": "2023-09-09T16:10:00.000Z",
"tag": "swift-5.10-DEVELOPMENT-SNAPSHOT-2023-09-09-a"
"date": "2023-10-24T16:10:00.000Z",
"tag": "swift-5.10-DEVELOPMENT-SNAPSHOT-2023-10-24-a"
},
"snapshot": {
"date": "2023-09-23T16:10:00.000Z",
"tag": "swift-DEVELOPMENT-SNAPSHOT-2023-09-23-a"
"date": "2023-10-24T16:10:00.000Z",
"tag": "swift-DEVELOPMENT-SNAPSHOT-2023-10-24-a"
}
},
"engines": {
Expand Down
24 changes: 22 additions & 2 deletions src/installer/verify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,35 @@ import {SignedToolchainSnapshot} from '../snapshot'
export abstract class VerifyingToolchainInstaller<
Snapshot extends SignedToolchainSnapshot
> extends ToolchainInstaller<Snapshot> {
private get signatureUrl() {
return `${this.baseUrl}/${this.data.download_signature}`
}

private async downloadSignature() {
try {
return await toolCache.downloadTool(this.signatureUrl)
} catch (error) {
if (
error instanceof toolCache.HTTPError &&
error.httpStatusCode === 404
) {
return undefined
}
throw error
}
}

protected async download() {
const sigUrl = `${this.baseUrl}/${this.data.download_signature}`
core.debug(`Downloading snapshot signature from "${sigUrl}"`)
const [, toolchain, signature] = await Promise.all([
gpg.setupKeys(),
super.download(),
toolCache.downloadTool(sigUrl)
this.downloadSignature()
])
await gpg.verify(signature, toolchain)
if (signature) {
await gpg.verify(signature, toolchain)
}
return toolchain
}
}
2 changes: 1 addition & 1 deletion swiftorg

0 comments on commit 3dc4e02

Please sign in to comment.