Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename bin command #216

Merged
merged 2 commits into from
Dec 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# For details of what checks are run for PRs please refer below
# docs: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions

name: Docker CI

on:
push:
branches: ["master"]
pull_request:
workflow_dispatch:

jobs:
test:
name: Build and test docker image
runs-on: ubuntu-latest
timeout-minutes: 30
env:
DOCKER_TAG: 'cdx-node-module-testing:${{ github.run_id }}.${{ github.run_number }}.${{ github.run_attempt }}'
steps:
- name: Checkout
# see https://github.com/actions/checkout
uses: actions/checkout@v2.4.0
- name: Build Docker image
run: docker build -f Dockerfile -t "$DOCKER_TAG" .
- name: Test Docker image
run: docker run --rm "$DOCKER_TAG" -h
- name: Destroy Docker image
# run regardless of outcome
if: ${{ always() }}
run: docker rmi -f "$DOCKER_TAG"
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:
CI: "true"

jobs:
build:
test:
name: Test (node${{ matrix.node-version }}, ${{ matrix.os }})
timeout-minutes: 30
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ RUN npm ci --only=production

COPY . /usr/src/cyclonedx-bom

ENTRYPOINT ["/usr/src/cyclonedx-bom/bin/cyclonedx-bom"]
ENTRYPOINT ["/usr/src/cyclonedx-bom/bin/make-bom.js"]
CMD ["-h"]
8 changes: 8 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.

## unreleased

* Changed
* Renamed `bin/cyclonedx-bom` to `bin/make-bom.js` (via [#216])
This is considered a none-breaking change,
as the CLI use of `npx cyclonedx-node`/`npx cyclonedx-bom`
is untouched.

[#216]: https://github.com/CycloneDX/cyclonedx-node-module/pull/216

## 3.2.0

* Added
Expand Down
2 changes: 2 additions & 0 deletions bin/cyclonedx-bom → bin/make-bom.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/usr/bin/env node
/* eslint-env node */

/*
* This file is part of CycloneDX Node Module.
*
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
],
"main": "index.js",
"bin": {
"cyclonedx-bom": "./bin/cyclonedx-bom",
"cyclonedx-node": "./bin/cyclonedx-bom"
"cyclonedx-bom": "./bin/make-bom.js",
"cyclonedx-node": "./bin/make-bom.js"
},
"scripts": {
"test": "jest",
"docker-release": "docker build . -t cyclonedx/cyclonedx-node:`node bin/cyclonedx-bom --version` -t cyclonedx/cyclonedx-node:latest && docker push cyclonedx/cyclonedx-node:`node bin/cyclonedx-bom --version` && docker push cyclonedx/cyclonedx-node:latest"
"docker-release": "docker build . -t cyclonedx/cyclonedx-node:`node bin/make-bom.js --version` -t cyclonedx/cyclonedx-node:latest && docker push cyclonedx/cyclonedx-node:`node bin/make-bom.js --version` && docker push cyclonedx/cyclonedx-node:latest"
},
"engines": {
"node": ">=12.0.0"
Expand Down
3 changes: 0 additions & 3 deletions tests/no-lockfile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@
}
],
"main": "index.js",
"bin": {
"cyclonedx-bom": "./bin/cyclonedx-bom"
},
"scripts": {
"test": "echo \"Warning: no test specified\" && exit 0"
},
Expand Down
3 changes: 0 additions & 3 deletions tests/with-lockfile-2/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions tests/with-lockfile-2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@
}
],
"main": "index.js",
"bin": {
"cyclonedx-bom": "./bin/cyclonedx-bom"
},
"scripts": {
"test": "echo \"Warning: no test specified\" && exit 0"
},
Expand Down
3 changes: 0 additions & 3 deletions tests/with-packages/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions tests/with-packages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@
}
],
"main": "index.js",
"bin": {
"cyclonedx-bom": "./bin/cyclonedx-bom"
},
"scripts": {
"test": "echo \"Warning: no test specified\" && exit 0"
},
Expand Down