Skip to content

Commit b95240c

Browse files
authored
add dist (#78)
* add dist * feat: add test back * feat: add test back * feat: add test back * feat: add test back * feat: add test back * feat: add test back * feat: add test back
1 parent c353697 commit b95240c

File tree

7 files changed

+4367
-712
lines changed

7 files changed

+4367
-712
lines changed

.github/workflows/check-dist.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,10 @@ jobs:
2323
steps:
2424
- uses: actions/checkout@v4
2525

26-
27-
- name: Set Node.js 20.x
28-
uses: actions/[email protected]
26+
- name: Set Node.js 22.x
27+
uses: actions/setup-node@v4
2928
with:
30-
node-version: 20.x
29+
node-version: 22
3130
cache: npm
3231

3332
- name: Install dependencies

.github/workflows/test.yaml

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,6 @@ on:
66
pull_request:
77

88
jobs:
9-
# unit tests
10-
units:
11-
name: Test Javascript
12-
runs-on: ubuntu-latest
13-
steps:
14-
- uses: actions/checkout@v4
15-
16-
- name: Set Node.js 16.x
17-
uses: actions/[email protected]
18-
with:
19-
node-version: 16.x
20-
cache: npm
21-
22-
- name: Install Dependencies
23-
run: npm ci
24-
25-
- name: Run Lint Test
26-
run: npm run lint
27-
28-
# - name: Run tests
29-
# run: npm test
30-
319
e2e:
3210
name: Test fslabscli Github Action
3311
runs-on: ubuntu-latest
@@ -37,8 +15,6 @@ jobs:
3715

3816
- name: Install Updatecli
3917
uses: ./
40-
with:
41-
token: ${{ secrets.GITHUB_TOKEN }}
4218

43-
- name: Test local action without install-only
44-
run: fslabscli generate-release-workflow --output .github/workflows/release.yml
19+
- name: Get fslabscli version
20+
run: fslabscli --version

dist/index.js

Lines changed: 161 additions & 672 deletions
Large diffs are not rendered by default.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/licenses.txt

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -604,13 +604,25 @@ uuid
604604
MIT
605605
The MIT License (MIT)
606606

607-
Copyright (c) 2010-2020 Robert Kieffer and other contributors
607+
Copyright (c) 2010-2016 Robert Kieffer and other contributors
608608

609-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
609+
Permission is hereby granted, free of charge, to any person obtaining a copy
610+
of this software and associated documentation files (the "Software"), to deal
611+
in the Software without restriction, including without limitation the rights
612+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
613+
copies of the Software, and to permit persons to whom the Software is
614+
furnished to do so, subject to the following conditions:
610615

611-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
616+
The above copyright notice and this permission notice shall be included in all
617+
copies or substantial portions of the Software.
612618

613-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
619+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
620+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
621+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
622+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
623+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
624+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
625+
SOFTWARE.
614626

615627

616628
wrappy

tests/main.test.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ const actionYaml = yaml.load(
1818
await fs.readFile(path.join(directory, '../action.yaml'))
1919
)
2020
const version = actionYaml.inputs.version.default
21-
const versionWithoutV = version.slice(1)
21+
const versionWithoutV = version.startsWith('v') ? version.slice(1) : version
2222

2323
process.env['INPUT_VERSION'] = version
24+
process.env['INPUT_TOKEN'] = process.env.GITHUB_TOKEN
25+
2426
const originalPlatform = process.platform
2527
const originalArch = process.arch
2628

@@ -46,10 +48,10 @@ describe('main', () => {
4648
await run()
4749
const file = path.join(
4850
cachePath,
49-
'fslabscli',
51+
'cargo-fslabscli',
5052
versionWithoutV,
5153
process.arch,
52-
'fslabscli'
54+
'cargo-fslabscli'
5355
)
5456
const fileStat = await fs.stat(file)
5557
expect(fileStat.isFile()).toBe(true)
@@ -87,10 +89,10 @@ describe('main', () => {
8789
await fslabscliDownload()
8890
const file = path.join(
8991
cachePath,
90-
'fslabscli',
92+
'cargo-fslabscli',
9193
versionWithoutV,
9294
process.arch,
93-
'fslabscli'
95+
'cargo-fslabscli'
9496
)
9597
const fileStat = await fs.stat(file)
9698
expect(fileStat.isFile()).toBe(true)

0 commit comments

Comments
 (0)