File tree Expand file tree Collapse file tree 3 files changed +62
-2
lines changed Expand file tree Collapse file tree 3 files changed +62
-2
lines changed Original file line number Diff line number Diff line change 6565 with :
6666 repo-token : ${{ secrets.GITHUB_TOKEN }}
6767 version : 3.x
68-
68+
69+ - name : Build License
70+ run : |
71+ task extract-licenses
72+ task append-license
73+
6974 - name : Build
7075 run : task dist:${{ matrix.env.os }}
7176
Original file line number Diff line number Diff line change 1+ // This file is part of arduino-cli.
2+ //
3+ // Copyright $Year $Holder
4+ //
5+ // This software is released under the GNU General Public License version 3,
6+ // which covers the main part of arduino-cli.
7+ // The terms of this license can be found at:
8+ // https://www.gnu.org/licenses/gpl-3.0.en.html
9+ //
10+ // You can be released from the requirements of the above licenses by purchasing
11+ // a commercial license. Buying such a license is mandatory if you want to
12+ // modify or otherwise use the software for commercial activities involving the
13+ // Arduino software without disclosing the source code of your own applications.
14+ // To purchase a commercial license, send an email to
[email protected] .
15+
16+
Original file line number Diff line number Diff line change @@ -2,8 +2,47 @@ version: "3"
22
33includes :
44 dist : ./DistTasks.yml
5-
5+
66tasks :
7+ extract-licenses :
8+ desc : Extract project and dependency licenses into debian copyright
9+ cmds :
10+ - |
11+ if ! command -v licensed >/dev/null; then
12+ echo "Installing Ruby gem: licensed"
13+ gem install licensed
14+ fi
15+ - |
16+ if [ ! -f .licensed.yml ]; then
17+ licensed init || true
18+ fi
19+ - licensed notices
20+ - mkdir -p debian/arduino-cli/usr/share/doc/arduino-cli/
21+ - cat LICENSE.txt > debian/arduino-cli/usr/share/doc/arduino-cli/copyright
22+ - echo -e "\n\n---\n\n" >> debian/arduino-cli/usr/share/doc/arduino-cli/copyright
23+ - find .licenses -type f -name "LICENSE*" -exec bash -c 'cat "$1"; echo -e "\n\n---\n\n"' _ {} \; >> debian/arduino-cli/usr/share/doc/arduino-cli/copyright
24+ sources :
25+ - LICENSE.txt
26+ - licenses/**
27+
28+
29+
30+ append-license :
31+ desc : Render and append arduino-cli license to NOTICE file
32+ cmds :
33+ - |
34+ rendered=$(envsubst < .licenses/templates/arduino-cli-license.txt)
35+ notice_file=".licenses/NOTICE.arduino-cli"
36+ tmp_file=$(mktemp)
37+ echo "$rendered" > "$tmp_file"
38+ echo -e "\n" >> "$tmp_file"
39+ cat "$notice_file" >> "$tmp_file"
40+ mv "$tmp_file" "$notice_file"
41+ env :
42+ Year : ' {{ now | date "2006" }}'
43+ Holder : ' ARDUINO SA (http://www.arduino.cc/)'
44+ silent : false
45+
746 docs:generate :
847 desc : Create all generated documentation content
948 deps :
You can’t perform that action at this time.
0 commit comments