This repository is used to store scripts and configuration for the Git repositories belonging to Metanorma.
*.[sh|ps1|bat]
-
different scripts used during build as part of CI workflow
cimas-config/
-
configuration files for Cimas
bin/gh-repo-manifest
-
(to be updated) script that generates/updates the
cimas-config/cimas.yml
file for the GitHub metanorma organization *-action/
-
GitHub actions
From time to time, repos are added, removed or renamed.
To reflect these updates easily we use the gh-repo-manifest
script to update cimas-config/cimas.yml
.
# TODO: Needs to be fixed
# bin/gh-repo-manifest -o metanorma,relaton
The primary config file is cimas-config/cimas.yml
.
Please see the Cimas configuration file format in Cimas' README.
You have to first install Cimas using:
gem install cimas
These are the commands to run:
Setup repository structure (clone all repos to $CIMAS_WD
)
cd ci
export CIMAS_CONFIG=cimas-config/cimas.yml
export CIMAS_MASTER_DIR=cimas-config
export CIMAS_WD=~/src/mn/cimas-wd
cimas setup -f $CIMAS_CONFIG -r $CIMAS_WD
Update repositories from remote[1]
cimas pull -f $CIMAS_CONFIG -r $CIMAS_WD \
-g samples
Update configuration[2]
cimas sync -f $CIMAS_CONFIG -r $CIMAS_WD \
-d $CIMAS_MASTER_DIR \
-g samples
Show difference
cimas diff -f $CIMAS_CONFIG -r $CIMAS_WD -d $CIMAS_MASTER_DIR \
-g samples
Push changes to remote[3]
cimas push -f $CIMAS_CONFIG -r $CIMAS_WD \
-b cimas-initial-run -m 'Cimas initial run' \
-g samples
Open PRs
cimas open-prs -f $CIMAS_CONFIG -r $CIMAS_WD \
-b cimas-initial-run -m 'Cimas initial run' \
-g samples
Hints:
-
You can update only specific group of repositories which listed in
-g
. This flag available for all sub-commands exceptsetup
Groups defined in$CIMAS_CONFIG
-
In case if you don’t wanna to clean you local changes before
sync
pass-k
flag -
In case if you did sync several times to push your changes to the same branch you will need to pass
--force
flag