Compare commits

...

6 Commits

Author SHA1 Message Date
5chdn
8cbfe862df Merge branch 'generate-json-rpc-doc' of https://github.com/cpurta/parity-ethereum into cpurta-generate-json-rpc-doc-03 2018-08-20 22:44:55 +02:00
Christopher Purta
4c5952dc99 Copy correct parity repo to jsonrpc folder
Copy correct parity repo to jsonrpc folder before attempting to build docs since the CI runner clones the repo as parity and not parity-ethereum.
2018-07-31 08:10:05 -07:00
Denis S. Soldatov aka General-Beck
10c4e0cae7 Update gitlab-rpc-docs.sh 2018-07-27 16:42:25 +03:00
Christopher Purta
b970425425 Only apply jsonrpc docs update on tags 2018-07-26 13:42:42 -07:00
Denis S. Soldatov aka General-Beck
a162087128 fix gitlab ci lint 2018-07-26 00:10:57 +03:00
Chris Purta
8f9b64f075 Add update docs script to CI
Added a script to CI that will use the jsonrpc tool to update rpc
documentation then commit and push those to the wiki repo.
2018-07-25 13:49:19 -07:00
2 changed files with 55 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ stages:
- test
- push-release
- build
- docs
variables:
RUST_BACKTRACE: "1"
RUSTFLAGS: ""
@@ -220,6 +221,15 @@ test-rust-nightly:
- rust
- rust-nightly
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:
stage: push-release
only:

45
scripts/gitlab-rpc-docs.sh Executable file
View 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() {
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
cp parity jsonrpc/.parity
cd jsonrpc
build_docs
cd ..
update_wiki_docs
cd wiki
commit_files
upload_files