-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathDeleteBundleIdCommand.swift
More file actions
34 lines (27 loc) · 951 Bytes
/
DeleteBundleIdCommand.swift
File metadata and controls
34 lines (27 loc) · 951 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright 2020 Itty Bitty Apps Pty Ltd
import ArgumentParser
import Bagbutik
import Combine
import Foundation
struct DeleteBundleIdCommand: CommonParsableCommand {
public static var configuration = CommandConfiguration(
commandName: "delete",
abstract: "Delete a bundle ID that is used for app development."
)
@OptionGroup()
var common: CommonOptions
@Argument(help: "The reverse-DNS bundle ID identifier to delete. Must be unique. (eg. com.example.app)")
var identifier: String
func run() async throws {
let service = try BagbutikService(authOptions: common.authOptions)
let bundleId = try await ReadBundleIdOperation(
service: service,
options: .init(bundleId: identifier)
)
.execute()
try await DeleteBundleIdOperation(
service: service,
options: .init(resourceId: bundleId.id))
.execute()
}
}