Skip to content

Commit

Permalink
CLOUDP-245948: Rename openapicli to foascli (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaangiolillo committed Apr 26, 2024
1 parent cb89953 commit 43a7514
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
labels: failed-release
title: "Releasing openapicli v${{ inputs.version_number }} failed at the tag creation step :scream_cat:"
title: "Releasing foascli v${{ inputs.version_number }} failed at the tag creation step :scream_cat:"
body: See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}

run-tests:
Expand Down Expand Up @@ -87,5 +87,5 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
labels: failed-release
title: "Releasing openapicli v${{ inputs.version_number }} failed at the goreleaser step :scream_cat:"
title: "Releasing foascli v${{ inputs.version_number }} failed at the goreleaser step :scream_cat:"
body: See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
12 changes: 6 additions & 6 deletions tools/cli/.goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Visit https://goreleaser.com for documentation on how to customize this
# behavior.
project_name: openapicli
project_name: foascli
before:
hooks:
# this is just an example and not a requirement for provider building/publishing
Expand All @@ -9,8 +9,8 @@ builds:
- <<: &build_defaults
env:
- CGO_ENABLED=0
binary: bin/openapicli
main: ./cmd/openapicli.go
binary: bin/foascli
main: ./cmd/foascli.go
ldflags:
- -s -w -X github.com/mongodb/openapi/tools/cli/internal/version.Version={{.Version}} -X github.com/mongodb/openapi/tools/cli/internal/version.GitCommit={{.FullCommit}}
id: linux
Expand All @@ -34,13 +34,13 @@ gomod: # https://goreleaser.com/customization/verifiable_builds/

archives:
- id: linux_archives
name_template: mongodb-openapi-cli_{{ .Version }}_{{ .Os }}_{{- if eq .Arch "amd64" }}x86_64{{- else }}{{ .Arch }}{{ end }}
name_template: mongodb-foas-cli_{{ .Version }}_{{ .Os }}_{{- if eq .Arch "amd64" }}x86_64{{- else }}{{ .Arch }}{{ end }}
builds: [linux]
wrap_in_directory: true
format: tar.gz
rlcp: false
- id: macos
name_template: mongodb-openapi-cli_{{ .Version }}_{{- if eq .Os "darwin" }}macos{{- else }}{{ .Os }}{{ end }}_{{- if eq .Arch "amd64" }}x86_64{{- else }}{{ .Arch }}{{ end }}
name_template: mongodb-foas-cli_{{ .Version }}_{{- if eq .Os "darwin" }}macos{{- else }}{{ .Os }}{{ end }}_{{- if eq .Arch "amd64" }}x86_64{{- else }}{{ .Arch }}{{ end }}
builds: [macos]
format: zip
wrap_in_directory: false
Expand All @@ -59,6 +59,6 @@ changelog:

release:
prerelease: auto
name_template: "OpenAPI CLI {{.Version}}"
name_template: "FOAS CLI {{.Version}}"


6 changes: 3 additions & 3 deletions tools/cli/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

GOLANGCI_VERSION=v1.56.2
SOURCE_FILES?=./cmd
BINARY_NAME=openapicli
BINARY_NAME=foascli
VERSION=v0.0.1
GIT_SHA?=$(shell git rev-parse HEAD)
DESTINATION=./bin/$(BINARY_NAME)
Expand Down Expand Up @@ -39,13 +39,13 @@ fmt: ### Format all go files with goimports and gofmt

.PHONY: build
build:
@echo "==> Building openapicli binary"
@echo "==> Building foascli binary"
go build -ldflags "$(LINKER_FLAGS)" -o $(DESTINATION) $(SOURCE_FILES)


.PHONY: build-debug
build-debug:
@echo "==> Building openapicli binary for debugging"
@echo "==> Building foascli binary for debugging"
go build -gcflags="$(DEBUG_FLAGS)" -ldflags "$(LINKER_FLAGS)" -o $(DESTINATION) $(SOURCE_FILES)

.PHONY: lint
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions tools/cli/internal/cli/root/openapi/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
)

const (
ToolName = "openapicli"
verTemplate = `openapicli version: %s
ToolName = "foascli"
verTemplate = `foascli version: %s
git version: %s
Go version: %s
os: %s
Expand All @@ -43,7 +43,7 @@ func Builder() *cobra.Command {
Use: ToolName,
Short: "CLI tool to validate and merge your Open API Specifications",
Example: ` # Display the help menu for the merge command:
openapicli merge --help
foascli merge --help
`,
SilenceUsage: true,
}
Expand Down

0 comments on commit 43a7514

Please sign in to comment.