Skip to content

Commit

Permalink
Update workflows and Makefile to include consistent make generate com…
Browse files Browse the repository at this point in the history
…mand
  • Loading branch information
thogarty committed Sep 28, 2023
1 parent 272e8f3 commit 83ea5d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: docker_run
.PHONY: generate

CURRENT_UID := $(shell id -u)
CURRENT_GID := $(shell id -g)
Expand Down Expand Up @@ -29,7 +29,7 @@ OPENAPI_CODEGEN_IMAGE=openapitools/openapi-generator-cli:${OPENAPI_CODEGEN_TAG}
DOCKER_OPENAPI=${CRI} run --rm -u ${CURRENT_UID}:${CURRENT_GID} -v $(CURDIR):/local ${OPENAPI_CODEGEN_IMAGE}
OPENAPI_URL=https://app.swaggerhub.com/apiproxy/registry/equinix-api/fabric/4.9

docker_run: clean fetch pre-spec-patch pull docker_generate build_client
generate: clean fetch pre-spec-patch pull docker_generate build_client

clean:
rm -rf ${OPENAPI_GENERATED_CLIENT}
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

Using openapi-generator-cli v3 docker image :
```
make docker_run
make generate
```

This will:
Expand All @@ -35,7 +35,7 @@ This will:

## Running sample:

Build generated client (Will be performed by the Makefile command `make docker_run`:
Build generated client (The Makefile command `make generate` includes these commands as well):
```
cd equinix-openapi-fabric
mvn clean package
Expand Down Expand Up @@ -101,5 +101,5 @@ through patches. The patching process is detailed below.
cd ..
```
3. ``patchfilename`` should be in format: ``<patch_index>-<short_patch_decription_or_identifier>.patch``
4. Run ``make docker_run`` to reapply the changes to oas spec.
5. Before pushing changes, commit ``fabric-java/spec/oas3.patched.json`` along with the patch file.
4. Run ``make generate`` to reapply the changes to oas spec.
5. Before pushing changes, commit ``fabric-java/spec/oas3.patched.json`` along with the patch file.

0 comments on commit 83ea5d1

Please sign in to comment.