Skip to content

Commit 506cb07

Browse files
authored
Merge pull request #46 from s-prak/ml-depcheck-utility
fix: sbom during github release
2 parents 829e63b + 8d67236 commit 506cb07

4 files changed

Lines changed: 7 additions & 15 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ project settings CircleCI. Then include the following in your `.circleci/config.
1616
version: 2.1
1717
setup: true
1818
orbs:
19-
build: mojaloop/build@1.0.71
19+
build: mojaloop/build@1.0.72
2020
workflows:
2121
setup:
2222
jobs:

‎src/examples/build_and_test.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ usage:
44
version: 2.1
55
setup: true
66
orbs:
7-
build: mojaloop/build@1.0.71
7+
build: mojaloop/build@1.0.72
88
workflows:
99
setup:
1010
jobs:

‎src/jobs/github_release.yml‎

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,8 @@ steps:
4444
- run:
4545
name: Generate SBOM
4646
command: |
47-
if compgen -G "sbom-*.csv" > /dev/null; then
47+
if ls | grep -Eq '^sbom-v[0-9]+\.[0-9]+\.[0-9]+\.csv$'; then
4848
echo "Found SBOM file"
49-
git rm sbom-*.csv 2>/dev/null || true
5049
rm -f sbom-*.csv
5150
# Generate new SBOM
5251
if [ -f yarn.lock ]; then
@@ -56,16 +55,9 @@ steps:
5655
echo "Generating SBOM using NPM"
5756
npx -y --package @mojaloop/ml-depcheck-utility@1.1.1 generate-sbom-npm
5857
fi
59-
# Get the new sbom filename
60-
sbom_file=$(ls sbom-*.csv 2>/dev/null || true)
61-
# Commit and push if new SBOM file is generated
62-
if [ -n "$sbom_file" ]; then
63-
git add "$sbom_file"
64-
git commit -m "chore(sbom): update $sbom_file [skip ci]" || echo "No changes to commit"
65-
git push origin "${CIRCLE_BRANCH}" || echo "Git push failed"
66-
else
67-
echo "No new SBOM file found after generation"
68-
fi
58+
git add .
59+
git commit -m "chore(sbom): update sbom [skip ci]" || echo "No changes to commit"
60+
git push origin "${CIRCLE_BRANCH}" || echo "Git push failed"
6961
else
7062
echo "No matching sbom-<version>.csv found. Skipping SBOM generation."
7163
fi

‎src/workflows/build_and_test.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: 2.1
22
orbs:
3-
build: mojaloop/build@1.0.71
3+
build: mojaloop/build@1.0.72
44
parameters:
55
git_tag:
66
type: string

0 commit comments

Comments
 (0)