7781cbbc57
* ci: reduce gitlab pipelines significantly * ci: build pipeline for PR * ci: remove dead weight * ci: remove github release script * ci: remove forever broken aura tests * ci: add random stuff to the end of the pipes * ci: add wind and mac to the end of the pipe * ci: remove snap artifacts * ci: (re)move dockerfiles * ci: clarify job names * ci: add cargo audit job * ci: make audit script executable * ci: ignore snap and docker files for rust check * ci: simplify audit script * ci: rename misc to optional * ci: add publish script to releaseable branches * ci: more verbose cp command for windows build * ci: fix weird binary checksum logic in push script * ci: fix regex in push script for windows * ci: simplify gitlab caching * docs: align README with ci changes * ci: specify default cargo target dir * ci: print verbose environment * ci: proper naming of scripts * ci: restore docker files * ci: use docker hub file * ci: use cargo home instead of cargo target dir * ci: touch random rust file to trigger real builds * ci: set cargo target dir for audit script * ci: remove temp file * ci: don't export the cargo target dir in the audit script * ci: fix windows unbound variable * docs: fix gitlab badge path * rename deprecated gitlab ci variables https://docs.gitlab.com/ee/ci/variables/#9-0-renaming * ci: fix git compare for nightly builds * test: skip c++ example for all platforms but linux * ci: add random rust file to trigger tests * ci: remove random rust file * disable cpp lib test for mac, win and beta (#9686)
64 lines
1.4 KiB
Bash
Executable File
64 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e # fail on any error
|
|
set -u # treat unset variables as error
|
|
|
|
clone_repos() {
|
|
echo "__________Clone repos__________"
|
|
git clone https://github.com/parity-js/jsonrpc.git jsonrpc
|
|
git clone https://github.com/paritytech/wiki.git wiki
|
|
}
|
|
|
|
build_docs() {
|
|
echo "__________Build docs__________"
|
|
npm install
|
|
npm run build:markdown
|
|
}
|
|
|
|
update_wiki_docs() {
|
|
echo "__________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() {
|
|
echo "__________Set github__________"
|
|
git config user.email "devops@parity.com"
|
|
git config user.name "Devops Parity"
|
|
}
|
|
|
|
set_remote_wiki() {
|
|
git config remote.origin.url "https://${GITHUB_TOKEN}@github.com/paritytech/wiki.git"
|
|
}
|
|
|
|
commit_files() {
|
|
echo "__________Commit files__________"
|
|
git checkout -b rpcdoc-update-${CI_COMMIT_REF_NAME}
|
|
git add .
|
|
git commit -m "Update docs to ${CI_COMMIT_REF_NAME}"
|
|
git tag -a "${CI_COMMIT_REF_NAME}" -m "Update RPC docs to ${CI_COMMIT_REF_NAME}"
|
|
}
|
|
|
|
upload_files() {
|
|
echo "__________Upload files__________"
|
|
git push origin HEAD
|
|
git push --tags
|
|
}
|
|
|
|
RPC_TRAITS_DIR="rpc/src/v1/traits"
|
|
|
|
setup_git
|
|
clone_repos
|
|
mkdir -p "jsonrpc/.parity/$RPC_TRAITS_DIR"
|
|
cp $RPC_TRAITS_DIR/*.rs "jsonrpc/.parity/$RPC_TRAITS_DIR"
|
|
cd jsonrpc
|
|
build_docs
|
|
cd ..
|
|
update_wiki_docs
|
|
cd wiki
|
|
set_remote_wiki
|
|
commit_files
|
|
upload_files
|