Skip to content

Commit 13bb42d

Browse files
authored
chore: release 2.0.0 (#498)
1 parent aee4f27 commit 13bb42d

9 files changed

Lines changed: 28 additions & 29 deletions

.github/workflows/demo-build-and-scan-docker-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
path: .
5858

5959
- name: Run EOL scan
60-
run: npx @herodevs/cli@beta scan eol --file=sbom.json --save
60+
run: npx @herodevs/cli scan eol --file=sbom.json --save
6161

6262
- name: Upload HD report
6363
uses: actions/upload-artifact@v6

.github/workflows/demo-scan-docker-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
path: .
5454

5555
- name: Run EOL scan
56-
run: npx @herodevs/cli@beta scan eol --file=sbom.json --save
56+
run: npx @herodevs/cli scan eol --file=sbom.json --save
5757

5858
- name: Upload HD report
5959
uses: actions/upload-artifact@v6

.github/workflows/demo-scan.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
node-version-file: '.nvmrc'
2020

2121
- name: Run EOL Scan
22-
run: npx @herodevs/cli@beta scan eol --save
22+
run: npx @herodevs/cli scan eol --save
2323

2424
- name: Upload artifact
2525
uses: actions/upload-artifact@v6

README.md

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ The HeroDevs CLI
2929
With Node installed, you can run the CLI directly from the npm registry without installing it globally or locally on your system
3030

3131
```sh
32-
npx @herodevs/cli@beta
32+
npx @herodevs/cli
3333
```
3434

3535
#### Global NPM Installation
3636

3737
```sh
38-
npm install -g @herodevs/cli@beta
38+
npm install -g @herodevs/cli
3939
```
4040

4141
#### Binary Installation
@@ -68,11 +68,11 @@ Maven and Gradle projects should run an install and build before scanning
6868
## Usage
6969
<!-- usage -->
7070
```sh-session
71-
$ npm install -g @herodevs/cli@beta
71+
$ npm install -g @herodevs/cli
7272
$ hd COMMAND
7373
running command...
7474
$ hd (--version)
75-
@herodevs/cli/2.0.0-beta.16 darwin-arm64 node-v24.10.0
75+
@herodevs/cli/2.0.0 darwin-arm64 node-v24.10.0
7676
$ hd --help [COMMAND]
7777
USAGE
7878
$ hd COMMAND
@@ -357,28 +357,19 @@ hd auth login
357357
hd auth provision-ci-token
358358
```
359359

360-
Copy the token output, add as CI secret: `HD_CI_CREDENTIAL`
360+
Copy the token output, add as an environment variable: `HD_CI_CREDENTIAL`
361361

362-
**CI pipeline (headless):** Run `hd scan eol` directly with `HD_CI_CREDENTIAL` set. The CLI exchanges the token for an access token automatically:
362+
**CI pipeline (headless):** Run `hd scan eol` directly with `HD_CI_CREDENTIAL` set. The CLI exchanges the token for an access token automatically. An explicit `auth login` command is not required when using the CI token.
363363

364364
```bash
365365
export HD_CI_CREDENTIAL="<token>"
366-
hd scan eol --dir .
366+
hd scan eol
367367
```
368368

369369
| Secret / Env Var | Purpose |
370370
|------------------|---------|
371371
| `HD_CI_CREDENTIAL` | Refresh token from provision; exchanged for access token |
372372

373-
#### Local testing
374-
375-
Reproduce the CI flow locally:
376-
377-
```bash
378-
export HD_CI_CREDENTIAL="<token-from-provision>"
379-
hd scan eol --dir /path/to/project
380-
```
381-
382373
#### GitHub Actions (authenticated scan)
383374

384375
Add secret `HD_CI_CREDENTIAL` in your repository or organization, then:
@@ -391,7 +382,7 @@ Add secret `HD_CI_CREDENTIAL` in your repository or organization, then:
391382
- name: Run EOL Scan
392383
env:
393384
HD_CI_CREDENTIAL: ${{ secrets.HD_CI_CREDENTIAL }}
394-
run: npx @herodevs/cli@beta scan eol -s
385+
run: npx @herodevs/cli scan eol -s
395386
```
396387
397388
#### GitLab CI (authenticated scan)
@@ -404,7 +395,7 @@ eol-scan:
404395
variables:
405396
HD_CI_CREDENTIAL: $HD_CI_CREDENTIAL
406397
script:
407-
- npx @herodevs/cli@beta scan eol -s
398+
- npx @herodevs/cli scan eol -s
408399
artifacts:
409400
paths:
410401
- herodevs.report.json
@@ -462,7 +453,7 @@ eol-scan:
462453
# Entrypoint or base command must be disabled due
463454
# to GitLab's execution mechanism and run manually
464455
entrypoint: [""]
465-
script: "npx @herodevs/cli@beta scan eol -s"
456+
script: "npx @herodevs/cli scan eol -s"
466457
artifacts:
467458
paths:
468459
- herodevs.report.json
@@ -502,7 +493,7 @@ jobs:
502493
- run: echo # Prepare environment, install tooling, perform setup, etc.
503494
504495
- name: Run EOL Scan
505-
run: npx @herodevs/cli@beta scan eol
496+
run: npx @herodevs/cli scan eol
506497
507498
- name: Upload artifact
508499
uses: actions/upload-artifact@v5
@@ -519,7 +510,7 @@ image: alpine
519510
eol-scan:
520511
script:
521512
- echo # Prepare environment, install tooling, perform setup, etc.
522-
- npx @herodevs/cli@beta scan eol -s
513+
- npx @herodevs/cli scan eol -s
523514
artifacts:
524515
paths:
525516
- herodevs.report.json

ci/image.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ENV NODE_NO_WARNINGS=1 \
33
NPM_CONFIG_UPDATE_NOTIFIER=false \
44
NPM_CONFIG_LOGLEVEL=error
55
WORKDIR /app
6-
ARG VERSION=beta
6+
ARG VERSION=2.0.0
77
USER root
88
RUN npm install -g @herodevs/cli@${VERSION}
99
COPY --chmod=755 ci/docker-entrypoint.sh /usr/local/bin/hd-entrypoint

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": "@herodevs/cli",
3-
"version": "2.0.0-beta.18",
3+
"version": "2.0.0",
44
"author": "HeroDevs, Inc",
55
"bin": {
66
"hd": "./bin/run.js"

scripts/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ INSTALL_DIR="$HOME/.herodevs"
3232
BIN_DIR="$INSTALL_DIR/bin"
3333
GITHUB_API_URL="https://api.github.com/repos/${REPO_OWNER}/${REPO_NAME}/releases"
3434
TMP_DIR=""
35-
LATEST_VERSION="v2.0.0-beta.18"
35+
LATEST_VERSION="v2.0.0"
3636
DEBUG=${DEBUG:-}
3737

3838
# Colors for output

scripts/update-install-script-version.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,28 @@ const __dirname = path.dirname(__filename);
1111

1212
const readmePath = path.join(__dirname, '../README.md');
1313
const installScriptPath = path.join(__dirname, './install.sh');
14+
const dockerfilePath = path.join(__dirname, '../ci/image.Dockerfile');
1415

1516
let readme = fs.readFileSync(readmePath, 'utf8');
1617
let installScript = fs.readFileSync(installScriptPath, 'utf8');
18+
let dockerfile = fs.readFileSync(dockerfilePath, 'utf8');
1719

1820
// Regex to match version string inside /cli/v{{version}}/scripts/
1921
const versionInInstallReadme = /(\/cli\/)v\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(\/scripts\/)/g;
2022

2123
// Regex to match the LATEST_VERSION defined in the install.sh script
2224
const versionInInstallScript = /(LATEST_VERSION=")v\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(")/g;
2325

26+
// Regex to match ARG VERSION=<version> in the Dockerfile
27+
const versionInDockerfile = /(ARG VERSION=)\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?/g;
28+
2429
readme = readme.replace(versionInInstallReadme, `$1v${newVersion}$2`);
2530
fs.writeFileSync(readmePath, readme);
2631

2732
installScript = installScript.replace(versionInInstallScript, `$1v${newVersion}$2`);
2833
fs.writeFileSync(installScriptPath, installScript);
2934

35+
dockerfile = dockerfile.replace(versionInDockerfile, `$1${newVersion}`);
36+
fs.writeFileSync(dockerfilePath, dockerfile);
37+
3038
console.log(`Updated install script and install command with ${newVersion}`);

0 commit comments

Comments
 (0)