Skip to content

Commit

Permalink
Merge pull request #462 from jhernand/use_released_metamodel_binary
Browse files Browse the repository at this point in the history
Use released metamodel binary
  • Loading branch information
jhernand authored Dec 20, 2021
2 parents b880e41 + 171164c commit b8479d8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 24 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/check-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,5 @@ jobs:
- name: Checkout the source
uses: actions/checkout@v2

- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.16

- name: Setup Goimports
run: go install golang.org/x/tools/cmd/[email protected]

- name: Run the checks
run: make check
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.idea/
/metamodel/
/metamodel
/openapi/
23 changes: 8 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,22 @@
#

# Details of the metamodel used to check the model:
metamodel_version:=v0.0.36
metamodel_url:=https://github.com/openshift-online/ocm-api-metamodel.git
metamodel_version:=v0.0.45
metamodel_url:=https://github.com/openshift-online/ocm-api-metamodel/releases/download/$(metamodel_version)/metamodel-linux-amd64
metamodel_sum:=200ffc61e3e65d28b323f3068b642355795185cf7c335ba5115ba54ccebb7f71

.PHONY: check
check: metamodel
metamodel/metamodel check --model=model
./metamodel check --model=model

.PHONY: openapi
openapi: metamodel
metamodel/metamodel generate openapi --model=model --output=openapi
./metamodel generate openapi --model=model --output=openapi

.PHONY: metamodel
metamodel:
rm -rf "$@"
if [ -d "$(metamodel_url)" ]; then \
cp -r "$(metamodel_url)" "$@"; \
else \
git clone "$(metamodel_url)" "$@"; \
cd "$@"; \
git fetch --tags origin; \
git checkout -B build "$(metamodel_version)"; \
fi
make -C "$@"
wget --progress=dot:giga --output-document="$@" "$(metamodel_url)"
echo "$(metamodel_sum) $@" | sha256sum --check
chmod +x "$@"

# Enforce indentation by tabs. License contains 2 spaces, so reject 3+.
lint:
Expand Down

0 comments on commit b8479d8

Please sign in to comment.