Skip to content

Latest commit

 

History

History
101 lines (69 loc) · 2.55 KB

README.adoc

File metadata and controls

101 lines (69 loc) · 2.55 KB

Metanorma Build Scripts

Lint Status

Purpose

This repository is used to store scripts and configuration for the Git repositories belonging to Metanorma.

Contents

*.[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

Usage

Updating repositories

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

Managing Cimas configuration (in cimas-config/)

The primary config file is cimas-config/cimas.yml.

Please see the Cimas configuration file format in Cimas' README.

Running Cimas to synchronize CI configuration

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:

  1. You can update only specific group of repositories which listed in -g. This flag available for all sub-commands except setup Groups defined in $CIMAS_CONFIG

  2. In case if you don’t wanna to clean you local changes before sync pass -k flag

  3. In case if you did sync several times to push your changes to the same branch you will need to pass --force flag