mirror of
https://gitee.com/actions-mirror/checkout.git
synced 2024-11-23 14:50:42 +08:00
script to generate license info (#614)
This commit is contained in:
parent
826ba42d6c
commit
3d677ac575
8
.github/workflows/licensed.yml
vendored
8
.github/workflows/licensed.yml
vendored
@ -11,10 +11,4 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- name: Install licensed
|
- run: npm run licensed-check
|
||||||
run: |
|
|
||||||
cd $RUNNER_TEMP
|
|
||||||
curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/2.12.2/licensed-2.12.2-linux-x64.tar.gz
|
|
||||||
sudo tar -xzf licensed.tar.gz
|
|
||||||
sudo mv licensed /usr/local/bin/licensed
|
|
||||||
- run: licensed status
|
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
__test__/_temp
|
__test__/_temp
|
||||||
|
_temp/
|
||||||
lib/
|
lib/
|
||||||
node_modules/
|
node_modules/
|
BIN
.licenses/npm/call-bind.dep.yml
generated
Normal file
BIN
.licenses/npm/call-bind.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/function-bind.dep.yml
generated
Normal file
BIN
.licenses/npm/function-bind.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/get-intrinsic.dep.yml
generated
Normal file
BIN
.licenses/npm/get-intrinsic.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/has-symbols.dep.yml
generated
Normal file
BIN
.licenses/npm/has-symbols.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/has.dep.yml
generated
Normal file
BIN
.licenses/npm/has.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/node-fetch.dep.yml
generated
BIN
.licenses/npm/node-fetch.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/object-inspect.dep.yml
generated
Normal file
BIN
.licenses/npm/object-inspect.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/qs.dep.yml
generated
Normal file
BIN
.licenses/npm/qs.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/side-channel.dep.yml
generated
Normal file
BIN
.licenses/npm/side-channel.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/tr46.dep.yml
generated
Normal file
BIN
.licenses/npm/tr46.dep.yml
generated
Normal file
Binary file not shown.
BIN
.licenses/npm/typed-rest-client.dep.yml
generated
BIN
.licenses/npm/typed-rest-client.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/underscore.dep.yml
generated
BIN
.licenses/npm/underscore.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/webidl-conversions.dep.yml
generated
Normal file
BIN
.licenses/npm/webidl-conversions.dep.yml
generated
Normal file
Binary file not shown.
Binary file not shown.
@ -8,7 +8,9 @@
|
|||||||
"format": "prettier --write '**/*.ts'",
|
"format": "prettier --write '**/*.ts'",
|
||||||
"format-check": "prettier --check '**/*.ts'",
|
"format-check": "prettier --check '**/*.ts'",
|
||||||
"lint": "eslint src/**/*.ts",
|
"lint": "eslint src/**/*.ts",
|
||||||
"test": "jest"
|
"test": "jest",
|
||||||
|
"licensed-check": "src/misc/licensed-check.sh",
|
||||||
|
"licensed-generate": "src/misc/licensed-generate.sh"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
8
src/misc/licensed-check.sh
Executable file
8
src/misc/licensed-check.sh
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
src/misc/licensed-download.sh
|
||||||
|
|
||||||
|
echo 'Running: licensed cached'
|
||||||
|
_temp/licensed-3.3.1/licensed status
|
24
src/misc/licensed-download.sh
Executable file
24
src/misc/licensed-download.sh
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ ! -f _temp/licensed-3.3.1.done ]; then
|
||||||
|
echo 'Clearing temp'
|
||||||
|
rm -rf _temp/licensed-3.3.1 || true
|
||||||
|
|
||||||
|
echo 'Downloading licensed'
|
||||||
|
mkdir -p _temp/licensed-3.3.1
|
||||||
|
pushd _temp/licensed-3.3.1
|
||||||
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
|
curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/3.3.1/licensed-3.3.1-darwin-x64.tar.gz
|
||||||
|
else
|
||||||
|
curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/3.3.1/licensed-3.3.1-linux-x64.tar.gz
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo 'Extracting licenesed'
|
||||||
|
tar -xzf licensed.tar.gz
|
||||||
|
popd
|
||||||
|
touch _temp/licensed-3.3.1.done
|
||||||
|
else
|
||||||
|
echo 'Licensed already downloaded'
|
||||||
|
fi
|
8
src/misc/licensed-generate.sh
Executable file
8
src/misc/licensed-generate.sh
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
src/misc/licensed-download.sh
|
||||||
|
|
||||||
|
echo 'Running: licensed cached'
|
||||||
|
_temp/licensed-3.3.1/licensed cache
|
Loading…
Reference in New Issue
Block a user