diff --git a/.github/workflows/dev-push.yml b/.github/workflows/dev-push.yml index 8dae868..d0582d2 100644 --- a/.github/workflows/dev-push.yml +++ b/.github/workflows/dev-push.yml @@ -13,10 +13,10 @@ jobs: submodules: true fetch-depth: 2 token: ${{ secrets.GIT_TOKEN }} - - name: Set up Python 3.8 + - name: Set up Python 3.9 uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: 3.9 - name: Install Trestle run: bash scripts/automation/install_trestle.sh - name: Automatically update content on push diff --git a/.github/workflows/main-push.yml b/.github/workflows/main-push.yml index 9065e4c..70df286 100644 --- a/.github/workflows/main-push.yml +++ b/.github/workflows/main-push.yml @@ -13,10 +13,10 @@ jobs: submodules: true fetch-depth: 0 token: ${{ secrets.GIT_TOKEN }} - - name: Set up Python 3.8 + - name: Set up Python 3.9 uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: 3.9 - name: Install Trestle run: bash scripts/automation/install_trestle.sh - name: Release @@ -42,7 +42,7 @@ jobs: token: ${{ secrets.GIT_TOKEN }} fetch-depth: 0 - name: Update profiles - run: bash scripts/automation/update_profile.sh + run: bash scripts/automation/update_downstream.sh env: GH_TOKEN: ${{ secrets.GIT_TOKEN }} merge-main-to-develop: diff --git a/README.md b/README.md index a537a84..5e10bd5 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ Steps to modify the catalog repository with an updated catalog are given below:
visual - +
###### 3. compare & pull request diff --git a/scripts/automation/check_and_update_all.sh b/scripts/automation/check_and_update_all.sh index b10c229..630b06a 100755 --- a/scripts/automation/check_and_update_all.sh +++ b/scripts/automation/check_and_update_all.sh @@ -4,7 +4,6 @@ CHANGES=`git diff-tree --no-commit-id --name-only -r HEAD` md_changed=false json_changed=false -xlsx_changed=false # bash regex does not support lazy match, so need to use two patterns to match before and after the control id md1=$"^md_catalogs/" @@ -13,9 +12,6 @@ md2=$"\.md$" json1=$"^catalogs/" json2=$"\.json$" -xlsx1=$"^data/" -xlsx2=$"\.xlsx$" - for val in ${CHANGES[@]} ; do if [[ $val =~ $md1 && $val =~ $md2 ]]; then md_changed=true @@ -24,18 +20,8 @@ for val in ${CHANGES[@]} ; do if [[ $val =~ $json1 && $val =~ $json2 ]]; then json_changed=true fi - - if [[ $val =~ $xlsx1 && $val =~ $xlsx2 ]]; then - xlsx_changed=true - fi done -if [[ $xlsx_changed = true ]]; then - echo "Xlsx file(s) were changed, generating catalog JSON and regenerating markdowns..." - python scripts/fs_cloud_create_oscal_catalog.py --input data/IBM_Cloud_Framework_for_Financial_Services_-_Control_Requirements_v1.1.0.xlsx --sheet "Control Requirements" --output catalogs/IBM_FS_CLOUD_ONLY --catalog catalogs/NIST_800-53_rev4/catalog.json - ./scripts/automation/regenerate_catalogs.sh -fi - if [[ $json_changed = true ]]; then echo "Json file(s) were changed, regenerating markdowns..." ./scripts/automation/regenerate_catalogs.sh @@ -47,6 +33,4 @@ if [[ $md_changed = true ]]; then ./scripts/automation/assemble_catalogs.sh fi - - -echo "$md_changed $json_changed $xlsx_changed" +echo "$md_changed $json_changed changed" diff --git a/scripts/automation/update_profile.sh b/scripts/automation/update_downstream.sh similarity index 100% rename from scripts/automation/update_profile.sh rename to scripts/automation/update_downstream.sh