Skip to content

Commit f274853

Browse files
authored
Fix the self update for macOS so that the installer is executed (#441)
* Fix the self update for macOS so that the installer is executed * Bump swift version to pass CI * Skip ubuntu 20.04 check since it is no longer supported by Swift * Bump minor version for init auto-upgrade * Include an entry for both minor versions
1 parent 30684f1 commit f274853

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

.github/workflows/pull_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
strategy:
4040
fail-fast: false
4141
matrix:
42-
container: ["ubuntu:20.04", "ubuntu:22.04", "ubuntu:24.04", "redhat/ubi9", "debian:12", "fedora:39"]
42+
container: ["ubuntu:22.04", "ubuntu:24.04", "redhat/ubi9", "debian:12", "fedora:39"]
4343
container:
4444
image: ${{ matrix.container }}
4545
steps:

.swift-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.1.0
1+
6.2.0

Sources/MacOSPlatform/MacOS.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,10 @@ public struct MacOS: Platform {
117117

118118
if ctx.mockedHomeDir == nil {
119119
await ctx.message("Extracting the swiftly package...")
120-
_ = sys.installer(
120+
try await sys.installer(
121121
.pkg(archive),
122122
.target("CurrentUserHomeDirectory")
123-
)
123+
).run(self)
124124
try? await sys.pkgutil(.volume(userHomeDir)).forget(pkg_id: "org.swift.swiftly").run(self)
125125
} else {
126126
let installDir = userHomeDir / ".swiftly"

Sources/Swiftly/Init.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ struct Init: SwiftlyCommand {
4848
(
4949
config.version == SwiftlyVersion(major: 0, minor: 4, patch: 0, suffix: "dev") ||
5050
config.version == SwiftlyVersion(major: 0, minor: 4, patch: 0) ||
51-
(config.version.major == 1 && config.version.minor == 0)
51+
(config.version.major == 1 && config.version.minor == 0) ||
52+
(config.version.major == 1 && config.version.minor == 1)
5253
)
5354
{
5455
// This is a simple upgrade from the 0.4.0 pre-releases, or 1.x

0 commit comments

Comments
 (0)