-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathcomponent.go
More file actions
34 lines (29 loc) · 1.01 KB
/
component.go
File metadata and controls
34 lines (29 loc) · 1.01 KB
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 (c) Microsoft Corporation.
// Licensed under the MIT License.
package component
import (
"github.com/microsoft/azure-linux-dev-tools/internal/app/azldev"
"github.com/spf13/cobra"
)
// Called once when the app is initialized; registers any commands or callbacks with the app.
func OnAppInit(app *azldev.App) {
cmd := &cobra.Command{
Use: "component",
Aliases: []string{"comp"},
Short: "Manage components",
Long: `Manage components in an Azure Linux project.
Components are the primary unit of packaging — each corresponds to exactly one
RPM spec file. Building a component results in producing one or more RPM packages.
Use subcommands to add, list, query, build, and prepare sources for
components defined in the project configuration.`,
}
app.AddTopLevelCommand(cmd)
addOnAppInit(app, cmd)
buildOnAppInit(app, cmd)
diffIdentityOnAppInit(app, cmd)
diffSourcesOnAppInit(app, cmd)
identityOnAppInit(app, cmd)
listOnAppInit(app, cmd)
prepareOnAppInit(app, cmd)
queryOnAppInit(app, cmd)
}