-
Notifications
You must be signed in to change notification settings - Fork 204
Makefile for building/linting #536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Savid
wants to merge
1
commit into
ethereum:master
Choose a base branch
from
Savid:feat/makefile
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| .PHONY: default build serve lint clean | ||
|
|
||
| default: build serve | ||
|
|
||
| build: | ||
| npx swagger-cli bundle ./beacon-node-oapi.yaml -r -t yaml -o ./deploy/beacon-node-oapi.yaml | ||
|
|
||
| serve: | ||
| npx http-server -c-1 deploy -o "/?urls.primaryName=dev" | ||
|
|
||
| lint: | ||
| npx @redocly/cli lint beacon-node-oapi.yaml | ||
|
|
||
| clean: | ||
| rm -f ./deploy/beacon-node-oapi.yaml | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -22,27 +22,26 @@ to perform validator related tasks, called "duties", on the beacon chain. | |||||
|
|
||||||
| The goal of this specification is to promote interoperability between various beacon node implementations. | ||||||
|
|
||||||
| ## Render | ||||||
| To render spec in browser you will need any http server to load `index.html` file | ||||||
| in root of the repo. | ||||||
| ## Build and Serve Locally | ||||||
|
|
||||||
| ##### Python | ||||||
| ``` | ||||||
| python -m http.server 8080 | ||||||
| ``` | ||||||
| And api spec will render on [http://localhost:8080](http://localhost:8080). | ||||||
| The easiest way to build and serve the API spec locally is using the provided Makefile: | ||||||
|
|
||||||
| ##### NodeJs | ||||||
| ``` | ||||||
| npm install simplehttpserver -g | ||||||
| ```bash | ||||||
| # Build and serve the spec (default) | ||||||
| make | ||||||
|
|
||||||
| # Build only | ||||||
| make build | ||||||
|
|
||||||
| # OR | ||||||
| # Serve only (after building) | ||||||
| make serve | ||||||
|
|
||||||
| yarn global add simplehttpserver | ||||||
| # Run linting | ||||||
| make lint | ||||||
|
|
||||||
| simplehttpserver | ||||||
| # Clean build artifacts | ||||||
| make clean | ||||||
| ``` | ||||||
| And api spec will render on [http://localhost:8000](http://localhost:8000). | ||||||
|
|
||||||
| ### Usage | ||||||
|
|
||||||
|
|
@@ -53,17 +52,9 @@ Users may need to tick the "Disable Cache" box in their browser's developer tool | |||||
| ## Contributing | ||||||
| Api spec is checked for lint errors before merge. | ||||||
|
|
||||||
| To run lint locally, install linter with | ||||||
| ``` | ||||||
| npm install -g @redocly/cli | ||||||
|
|
||||||
| # OR | ||||||
|
|
||||||
| yarn global add @redocly/cli | ||||||
| ``` | ||||||
| and run lint with | ||||||
| To run lint locally, run | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| ``` | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| redocly lint beacon-node-oapi.yaml | ||||||
| make lint | ||||||
| ``` | ||||||
|
|
||||||
| ## Releasing | ||||||
|
|
||||||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we wanna copy files like
index.htmlhere as well?beacon-APIs/.github/workflows/deploy.yaml
Lines 43 to 48 in c44a54d