Merge branch 'generate-json-rpc-doc' of https://github.com/cpurta/parity-ethereum into cpurta-generate-json-rpc-doc
This commit is contained in:
commit
6975b1d074
@ -2,6 +2,7 @@ stages:
|
|||||||
- test
|
- test
|
||||||
- push-release
|
- push-release
|
||||||
- build
|
- build
|
||||||
|
- docs
|
||||||
variables:
|
variables:
|
||||||
RUST_BACKTRACE: "1"
|
RUST_BACKTRACE: "1"
|
||||||
RUSTFLAGS: ""
|
RUSTFLAGS: ""
|
||||||
@ -220,6 +221,15 @@ test-rust-nightly:
|
|||||||
- rust
|
- rust
|
||||||
- rust-nightly
|
- rust-nightly
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
json-rpc-docs:
|
||||||
|
stage: docs
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
|
image: parity/rust:gitlab-ci
|
||||||
|
script:
|
||||||
|
- scripts/gitlab-rpc-docs.sh
|
||||||
|
tags:
|
||||||
|
- docs
|
||||||
push-release:
|
push-release:
|
||||||
stage: push-release
|
stage: push-release
|
||||||
only:
|
only:
|
||||||
|
45
scripts/gitlab-rpc-docs.sh
Executable file
45
scripts/gitlab-rpc-docs.sh
Executable file
@ -0,0 +1,45 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
clone_repos() {
|
||||||
|
git clone https://github.com/parity-js/jsonrpc.git jsonrpc
|
||||||
|
git clone https://github.com/paritytech/wiki.git wiki
|
||||||
|
}
|
||||||
|
|
||||||
|
build_docs() {
|
||||||
|
cp parity-ethereum jsonrpc/.parity
|
||||||
|
npm install
|
||||||
|
npm run build:markdown
|
||||||
|
}
|
||||||
|
|
||||||
|
update_wiki_docs() {
|
||||||
|
for file in $(ls jsonrpc/docs); do
|
||||||
|
module_name=${file:0:-3}
|
||||||
|
mv jsonrpc/docs/$file wiki/JSONRPC-$module_name-module.md
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
setup_git() {
|
||||||
|
git config user.email "devops@parity.com"
|
||||||
|
git config user.name "Devops Parity"
|
||||||
|
}
|
||||||
|
|
||||||
|
commit_files() {
|
||||||
|
git checkout -b rpcdoc-update-${CI_COMMIT_REF_NAME}
|
||||||
|
git commit .
|
||||||
|
git commit -m "Update docs to ${CI_COMMIT_REF_NAME}"
|
||||||
|
git tag -a "${CI_COMMIT_REF_NAME}"
|
||||||
|
}
|
||||||
|
|
||||||
|
upload_files() {
|
||||||
|
git push --tags
|
||||||
|
}
|
||||||
|
|
||||||
|
setup_git
|
||||||
|
clone_repos
|
||||||
|
cd jsonrpc
|
||||||
|
build_docs
|
||||||
|
cd ..
|
||||||
|
update_wiki_docs
|
||||||
|
cd wiki
|
||||||
|
commit_files
|
||||||
|
upload_files
|
Loading…
Reference in New Issue
Block a user