Skip to content

Commit

Permalink
various fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Lou DeGenaro <[email protected]>
  • Loading branch information
degenaro committed Sep 11, 2023
1 parent 4ed7d52 commit 648b012
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dev-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/main-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Steps to modify the catalog repository with an updated catalog are given below:

<details>
<summary>visual</summary>
<img src="drawio/ss.update-catalog.drawio.png" width="500" height="600">
<img src="drawio/ss.copy-catalog.drawio.png" width="500" height="600">
</details>

###### 3. compare & pull request
Expand Down
18 changes: 1 addition & 17 deletions scripts/automation/check_and_update_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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"
File renamed without changes.

0 comments on commit 648b012

Please sign in to comment.