feat: Renames update-version plugin to bump-version, removes generate plugin as the bump-version can be called with the generate arguments.
All checks were successful
CI / Ubuntu (push) Successful in 2m42s
All checks were successful
CI / Ubuntu (push) Successful in 2m42s
This commit is contained in:
24
Plugins/BumpVersionPlugin/BumpVersionPlugin.swift
Normal file
24
Plugins/BumpVersionPlugin/BumpVersionPlugin.swift
Normal file
@@ -0,0 +1,24 @@
|
||||
import Foundation
|
||||
import PackagePlugin
|
||||
|
||||
@main
|
||||
struct BumpVersionPlugin: CommandPlugin {
|
||||
|
||||
func performCommand(context: PluginContext, arguments: [String]) async throws {
|
||||
print("Starting bump-version plugin")
|
||||
let tool = try context.tool(named: "bump-version")
|
||||
|
||||
print("arguments: \(arguments)")
|
||||
|
||||
let process = Process()
|
||||
process.executableURL = tool.url
|
||||
process.arguments = arguments
|
||||
try process.run()
|
||||
process.waitUntilExit()
|
||||
|
||||
guard process.terminationReason == .exit && process.terminationStatus == 0 else {
|
||||
Diagnostics.error("Reason: \(process.terminationReason), status: \(process.terminationStatus)")
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user