Skip to content

Commit e17e361

Browse files
authored
Arm32 package (#25)
* Arm32 package Signed-off-by: Prabhu Subramanian <[email protected]> --------- Signed-off-by: Prabhu Subramanian <[email protected]>
1 parent 08c6c57 commit e17e361

File tree

18 files changed

+89
-36
lines changed

18 files changed

+89
-36
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,6 @@ jobs:
2525
if: matrix.os == 'ubuntu-latest'
2626
- uses: oras-project/setup-oras@v1
2727
- run: oras version
28-
- uses: actions/cache@v4
29-
with:
30-
path: |
31-
~/.cache/go-build
32-
~/go/pkg/mod
33-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
34-
restore-keys: |
35-
${{ runner.os }}-go-
3628
- name: Release
3729
run: |
3830
wget https://github.com/upx/upx/releases/download/v4.2.4/upx-4.2.4-amd64_linux.tar.xz
@@ -61,6 +53,13 @@ jobs:
6153
npm publish --access=public --@cyclonedx:registry='https://registry.npmjs.org'
6254
popd
6355
56+
pushd packages/linux-arm
57+
echo "cyclonedx:registry=https://npm.pkg.github.com" > ~/.npmrc
58+
npm publish --access=public --@cyclonedx:registry='https://npm.pkg.github.com'
59+
echo "cyclonedx:registry=https://registry.npmjs.org" > ~/.npmrc
60+
npm publish --access=public --@cyclonedx:registry='https://registry.npmjs.org'
61+
popd
62+
6463
pushd packages/windows-arm64
6564
echo "cyclonedx:registry=https://npm.pkg.github.com" > ~/.npmrc
6665
npm publish --access=public --@cyclonedx:registry='https://npm.pkg.github.com'

.github/workflows/test.yml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ name: Build npm package
22

33
on:
44
pull_request:
5-
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
7+
cancel-in-progress: true
68
jobs:
79
pkg:
810
runs-on: ubuntu-latest
@@ -26,14 +28,6 @@ jobs:
2628
if: matrix.os == 'ubuntu-latest'
2729
- uses: oras-project/setup-oras@v1
2830
- run: oras version
29-
- uses: actions/cache@v4
30-
with:
31-
path: |
32-
~/.cache/go-build
33-
~/go/pkg/mod
34-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
35-
restore-keys: |
36-
${{ runner.os }}-go-
3731
- name: Trim CI agent
3832
run: |
3933
chmod +x contrib/free_disk_space.sh
@@ -54,6 +48,9 @@ jobs:
5448
pushd packages/linux-arm64
5549
npm publish --dry-run
5650
popd
51+
pushd packages/linux-arm
52+
npm publish --dry-run
53+
popd
5754
pushd packages/windows-arm64
5855
npm publish --dry-run
5956
popd
@@ -83,14 +80,6 @@ jobs:
8380
- uses: actions/setup-python@v5
8481
with:
8582
python-version: '3.11'
86-
- uses: actions/cache@v4
87-
with:
88-
path: |
89-
~/.cache/go-build
90-
~/go/pkg/mod
91-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
92-
restore-keys: |
93-
${{ runner.os }}-go-
9483
- name: Build
9584
run: |
9685
.\build.ps1

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ upx -9 --lzma ./plugins/trivy/trivy-cdxgen-linux-amd64
3737
./plugins/trivy/trivy-cdxgen-linux-amd64 -v
3838
./plugins/dosai/dosai-linux-amd64 --help
3939

40-
for flavours in windows-amd64 linux-arm64 windows-arm64 darwin-arm64 darwin-amd64 ppc64
40+
for flavours in windows-amd64 linux-arm64 linux-arm windows-arm64 darwin-arm64 darwin-amd64 ppc64
4141
do
4242
chmod +x packages/$flavours/build-$flavours.sh
4343
pushd packages/$flavours

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cyclonedx/cdxgen-plugins-bin",
3-
"version": "1.6.5",
3+
"version": "1.6.6",
44
"description": "Binary plugins to supercharge @cyclonedx/cdxgen npm package",
55
"main": "index.js",
66
"repository": {

packages/darwin-amd64/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cyclonedx/cdxgen-plugins-bin-darwin-amd64",
3-
"version": "1.6.5",
3+
"version": "1.6.6",
44
"description": "Arm64 binary plugins to supercharge @cyclonedx/cdxgen npm package",
55
"main": "index.js",
66
"repository": {

packages/darwin-arm64/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cyclonedx/cdxgen-plugins-bin-darwin-arm64",
3-
"version": "1.6.5",
3+
"version": "1.6.6",
44
"description": "Arm64 binary plugins to supercharge @cyclonedx/cdxgen npm package",
55
"main": "index.js",
66
"repository": {
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
3+
rm -rf plugins/trivy
4+
rm -rf plugins/osquery
5+
rm -rf plugins/dosai
6+
mkdir -p plugins/osquery plugins/dosai
7+
8+
curl -L https://github.com/owasp-dep-scan/dosai/releases/latest/download/Dosai-linux-arm -o plugins/dosai/dosai-linux-arm
9+
chmod +x plugins/dosai/dosai-linux-arm
10+
sha256sum plugins/dosai/dosai-linux-arm > plugins/dosai/dosai-linux-arm.sha256
11+
12+
for plug in trivy
13+
do
14+
mkdir -p plugins/$plug
15+
mv ../../plugins/$plug/*linux-arm* plugins/$plug/
16+
upx -9 --lzma plugins/$plug/*linux-arm* || true
17+
done

packages/linux-arm/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Debug mode flag
2+
const DEBUG_MODE =
3+
process.env.CDXGEN_DEBUG_MODE === "debug" ||
4+
process.env.NODE_ENV === "development";
5+
6+
if (DEBUG_MODE) {
7+
console.log("cdxgen plugins check");
8+
}

packages/linux-arm/package.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"name": "@cyclonedx/cdxgen-plugins-bin-arm",
3+
"version": "1.6.6",
4+
"description": "Arm binary plugins to supercharge @cyclonedx/cdxgen npm package",
5+
"main": "index.js",
6+
"repository": {
7+
"type": "git",
8+
"url": "git+https://github.com/cyclonedx/cdxgen-plugins-bin.git"
9+
},
10+
"keywords": [
11+
"cdxgen",
12+
"sbom",
13+
"bom",
14+
"plugins",
15+
"dependency",
16+
"appsec"
17+
],
18+
"author": "Prabhu Subramanian <[email protected]>",
19+
"license": "Apache-2.0",
20+
"bugs": {
21+
"url": "https://github.com/cyclonedx/cdxgen-plugins-bin/issues"
22+
},
23+
"homepage": "https://github.com/cyclonedx/cdxgen-plugins-bin#readme",
24+
"files": [
25+
"*.js",
26+
"plugins/"
27+
],
28+
"os": [
29+
"linux"
30+
],
31+
"cpu": [
32+
"arm"
33+
]
34+
}

0 commit comments

Comments
 (0)