File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Update LicenseDB with latest updates from scancode-toolkit develop daily
22on :
33 schedule :
4- - cron : ' 0 16 * * 0-6 '
4+ - cron : ' 0 16 * * 1-5 '
55 workflow_dispatch :
66
77jobs :
@@ -21,15 +21,13 @@ jobs:
2121 with :
2222 python-version : 3.8
2323
24- - name : Give execute access to the script
25- run : chmod u+x ./etc/scripts/check_commit_run_update.sh
26-
2724 - name : Run script
2825 run : ./etc/scripts/check_commit_run_update.sh
2926
3027 - name : Commit and Push to Publish
3128 run : |
3229 git config --global user.name 'LicenseDB Update GitHub Action'
3330 git config --global user.email 'asmahapatra@nexb.com'
34- git commit -am "Automated LicenseDB update with latest from scancode-toolkit develop"
31+ git add docs/* etc/*
32+ git commit -m "Automated LicenseDB update with latest from scancode-toolkit develop"
3533 git push
Original file line number Diff line number Diff line change @@ -41,30 +41,15 @@ conf:
4141 @venv/bin/pip install -e ./scancode-toolkit/
4242 @venv/bin/scancode-reindex-licenses
4343
44- restore :
44+ clean :
4545 @echo " -> Restoring the repository to a clean state"
4646 git clean -fd
4747 rm -rf scancode-toolkit/
4848 git restore --worktree docs/
4949
50- clean :
51- # Remove the whole content of docs/ except for the CNAME file
52- # Remove the whole content of scancode-toolkit/
53- find docs/* ! -name ' CNAME' -exec git rm -r {} +
54- find scancode-toolkit/* -exec git rm -r {} +
55-
56- html :
50+ licensedb :
5751 @echo " -> Generate the HTML content"
5852 @venv/bin/scancode-license-data --path docs/
5953 @echo " Available at docs/index.html"
6054
61- build : conf html
62-
63- publish :
64- @echo " -> Add changes to git"
65- @git add .
66- git commit -m " Upgrade with latest updates from ScanCode-toolkit develop"
67- @echo " -> Push changes to main repo"
68- @git push
69-
70- .PHONY : conf clean html build publish
55+ .PHONY : conf clean licensedb
Original file line number Diff line number Diff line change @@ -85,9 +85,9 @@ Support
8585Build
8686-----
8787
88- To re/generate the HTML and API content use this command ::
88+ To re/generate the HTML and API content run the following script ::
8989
90- $ make restore conf html
90+ $ ./etc/scripts/check_commit_run_update.sh
9191
9292
9393License
Original file line number Diff line number Diff line change 33set -e
44
55# Clear the repository
6- make restore
6+ make clean
77
88# Create a virtualenv and clone scancode
99make conf
1919venv/bin/python ./etc/scripts/check_commit.py --commit " $COMMIT_LATEST "
2020
2121# build docs
22- make html
22+ make licensedb
2323
2424# delete cloned scancode as only the doc updates should be commited
2525rm -rf scancode-toolkit/
You can’t perform that action at this time.
0 commit comments