Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
description: "Version of swiftly to build release artifacts"
required: true
type: string
default: "0.4.0-dev"
default: "0.4.0"
skip:
description: "Perform release checks, such as the git tag, and swift version, or '--skip' to skip that."
required: true
Expand Down
16 changes: 15 additions & 1 deletion Sources/Swiftly/Init.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,22 @@ internal struct Init: SwiftlyCommand {

var config = try? Config.load()

if var config, !overwrite && config.version == SwiftlyVersion(major: 0, minor: 4, patch: 0, suffix: "dev") {
// This is a simple upgrade from the 0.4.0-dev pre-release

// Move our executable over to the correct place
try Swiftly.currentPlatform.installSwiftlyBin()

// Update and save the version
config.version = SwiftlyCore.version

try config.save()

return
}

if let config, !overwrite && config.version != SwiftlyCore.version {
// We don't support downgrades, and we don't yet support upgrades
// We don't support downgrades, and versions prior to 0.4.0-dev
throw SwiftlyError(message: "An existing swiftly installation was detected. You can try again with '--overwrite' to overwrite it.")
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftlyCore/SwiftlyCore.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation

public let version = SwiftlyVersion(major: 0, minor: 4, patch: 0, suffix: "dev")
public let version = SwiftlyVersion(major: 0, minor: 4, patch: 0)

/// A separate home directory to use for testing purposes. This overrides swiftly's default
/// home directory location logic.
Expand Down