Skip to content

Commit

Permalink
Merge pull request #139 from CircleCI-Public/brady/circle-13813-gobal…
Browse files Browse the repository at this point in the history
…-read-warning-for-inc-and-release

[Circle-13813] More world readable warnings
  • Loading branch information
Zachary Scott authored Sep 28, 2018
2 parents 599362a + 3ce767a commit e9c8624
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
6 changes: 4 additions & 2 deletions cmd/namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ func newNamespaceCommand() *cobra.Command {
}

createCmd := &cobra.Command{
Use: "create <name> <vcs-type> <org-name>",
Short: "Create a namespace",
Use: "create <name> <vcs-type> <org-name>",
Short: "Create a namespace",
Long: `Create a namespace.
Please note that at this time all namespaces created in the registry are world-readable.`,
RunE: createNamespace,
Args: cobra.ExactArgs(3),
Annotations: make(map[string]string),
Expand Down
26 changes: 18 additions & 8 deletions cmd/orb.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ func newOrbCommand() *cobra.Command {
processCommand.Annotations["<path>"] = orbAnnotations["<path>"]

publishCommand := &cobra.Command{
Use: "publish <path> <orb>",
Short: "Publish an orb to the registry",
Use: "publish <path> <orb>",
Short: "Publish an orb to the registry",
Long: `Publish an orb to the registry.
Please note that at this time all orbs published to the registry are world-readable.`,
RunE: publishOrb,
Args: cobra.ExactArgs(2),
Annotations: make(map[string]string),
Expand All @@ -66,8 +68,10 @@ func newOrbCommand() *cobra.Command {
publishCommand.Annotations["<path>"] = orbAnnotations["<path>"]

promoteCommand := &cobra.Command{
Use: "promote <orb> <segment>",
Short: "Promote a development version of an orb to a semantic release",
Use: "promote <orb> <segment>",
Short: "Promote a development version of an orb to a semantic release",
Long: `Promote a development version of an orb to a semantic release.
Please note that at this time all orbs promoted within the registry are world-readable.`,
RunE: promoteOrb,
Args: cobra.ExactArgs(2),
Annotations: make(map[string]string),
Expand All @@ -76,8 +80,10 @@ func newOrbCommand() *cobra.Command {
promoteCommand.Annotations["<segment>"] = `"major"|"minor"|"patch"`

incrementCommand := &cobra.Command{
Use: "increment <path> <namespace>/<orb> <segment>",
Short: "Increment a released version of an orb",
Use: "increment <path> <namespace>/<orb> <segment>",
Short: "Increment a released version of an orb",
Long: `Increment a released version of an orb.
Please note that at this time all orbs incremented within the registry are world-readable.`,
RunE: incrementOrb,
Args: cobra.ExactArgs(3),
Annotations: make(map[string]string),
Expand All @@ -103,8 +109,10 @@ func newOrbCommand() *cobra.Command {
orbCreate := &cobra.Command{
Use: "create <namespace>/<orb>",
Short: "Create an orb in the specified namespace",
RunE: createOrb,
Args: cobra.ExactArgs(1),
Long: `Create an orb in the specified namespace
Please note that at this time all orbs created in the registry are world-readable.`,
RunE: createOrb,
Args: cobra.ExactArgs(1),
}

orbCommand := &cobra.Command{
Expand Down Expand Up @@ -253,6 +261,7 @@ func incrementOrb(cmd *cobra.Command, args []string) error {
}

Logger.Infof("Orb `%s` bumped to '%s'.\n", ref, response.HighestVersion)
Logger.Info("Please note that this is an open orb and is world-readable.")
return nil
}

Expand All @@ -279,6 +288,7 @@ func promoteOrb(cmd *cobra.Command, args []string) error {
}

Logger.Infof("Orb `%s` promoted to '%s'.\n", ref, response.HighestVersion)
Logger.Info("Please note that this is an open orb and is world-readable.")
return nil
}

Expand Down
2 changes: 2 additions & 0 deletions cmd/orb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,7 @@ var _ = Describe("Orb integration tests", func() {

Expect(err).ShouldNot(HaveOccurred())
Eventually(session.Out).Should(gbytes.Say("Orb `my/orb` bumped to '0.1.0'."))
Eventually(session.Out).Should(gbytes.Say("Please note that this is an open orb and is world-readable."))
Eventually(session).Should(gexec.Exit(0))
})

Expand Down Expand Up @@ -826,6 +827,7 @@ var _ = Describe("Orb integration tests", func() {

Expect(err).ShouldNot(HaveOccurred())
Eventually(session.Out).Should(gbytes.Say("Orb `my/orb@dev:foo` promoted to '0.1.0'."))
Eventually(session.Out).Should(gbytes.Say("Please note that this is an open orb and is world-readable."))
Eventually(session).Should(gexec.Exit(0))
})

Expand Down

0 comments on commit e9c8624

Please sign in to comment.