script to generate license info (#614)

This commit is contained in:
eric sciple 2021-10-19 14:30:04 -05:00 committed by GitHub
parent 826ba42d6c
commit 3d677ac575
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 45 additions and 8 deletions

View File

@ -11,10 +11,4 @@ jobs:
steps:
- uses: actions/checkout@v2
- run: npm ci
- name: Install licensed
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
- run: npm run licensed-check

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
__test__/_temp
_temp/
lib/
node_modules/

BIN
.licenses/npm/call-bind.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/function-bind.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/get-intrinsic.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/has-symbols.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/has.dep.yml generated Normal file

Binary file not shown.

Binary file not shown.

BIN
.licenses/npm/object-inspect.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/qs.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/side-channel.dep.yml generated Normal file

Binary file not shown.

BIN
.licenses/npm/tr46.dep.yml generated Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
.licenses/npm/webidl-conversions.dep.yml generated Normal file

Binary file not shown.

View File

@ -8,7 +8,9 @@
"format": "prettier --write '**/*.ts'",
"format-check": "prettier --check '**/*.ts'",
"lint": "eslint src/**/*.ts",
"test": "jest"
"test": "jest",
"licensed-check": "src/misc/licensed-check.sh",
"licensed-generate": "src/misc/licensed-generate.sh"
},
"repository": {
"type": "git",

8
src/misc/licensed-check.sh Executable file
View 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
View 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
View 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