Skip to content

Commit 797c5a0

Browse files
authoredOct 4, 2021
Merge pull request #9 from per1234/ci
Install standardized CI system
2 parents d90459c + 0eccc30 commit 797c5a0

20 files changed

+1313
-19
lines changed
 

‎.codespellrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/spell-check/.codespellrc
2+
# See: https://github.com/codespell-project/codespell#using-a-config-file
3+
[codespell]
4+
# In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here:
5+
ignore-words-list = ,
6+
skip = ./.git,./go.mod,./go.sum,./package-lock.json,./poetry.lock,./yarn.lock
7+
builtin = clear,informal,en-GB_to_en-US
8+
check-filenames =
9+
check-hidden =

‎.ecrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"Exclude": [
3+
"^LICENSE\\.txt$",
4+
"^poetry\\.lock$"
5+
]
6+
}

‎.editorconfig

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/general/.editorconfig
2+
# See: https://editorconfig.org/
3+
# The formatting style defined in this file is the official standardized style to be used in all Arduino Tooling
4+
# projects and should not be modified.
5+
# Note: indent style for each file type is defined even when it matches the universal config in order to make it clear
6+
# that this type has an official style.
7+
8+
[*]
9+
charset = utf-8
10+
end_of_line = lf
11+
indent_size = 2
12+
indent_style = space
13+
insert_final_newline = true
14+
trim_trailing_whitespace = true
15+
16+
[*.{adoc,asc,asciidoc}]
17+
indent_size = 2
18+
indent_style = space
19+
20+
[*.{bash,sh}]
21+
indent_size = 2
22+
indent_style = space
23+
24+
[*.{c,cc,cp,cpp,cxx,h,hh,hpp,hxx,ii,inl,ino,ixx,pde,tpl,tpp,txx}]
25+
indent_size = 2
26+
indent_style = space
27+
28+
[*.{go,mod}]
29+
indent_style = tab
30+
31+
[*.java]
32+
indent_size = 2
33+
indent_style = space
34+
35+
[*.{js,jsx,json,jsonc,json5,ts,tsx}]
36+
indent_size = 2
37+
indent_style = space
38+
39+
[*.{md,mdx,mkdn,mdown,markdown}]
40+
indent_size = unset
41+
indent_style = space
42+
43+
[*.proto]
44+
indent_size = 2
45+
indent_style = space
46+
47+
[*.py]
48+
indent_size = 4
49+
indent_style = space
50+
51+
[*.svg]
52+
indent_size = 2
53+
indent_style = space
54+
55+
[*.{yaml,yml}]
56+
indent_size = 2
57+
indent_style = space
58+
59+
[{.gitconfig,.gitmodules}]
60+
indent_style = tab
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-general-formatting-task.md
2+
name: Check General Formatting
3+
4+
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
5+
on:
6+
push:
7+
pull_request:
8+
schedule:
9+
# Run every Tuesday at 8 AM UTC to catch breakage caused by changes to tools.
10+
- cron: "0 8 * * TUE"
11+
workflow_dispatch:
12+
repository_dispatch:
13+
14+
jobs:
15+
check:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Set environment variables
20+
run: |
21+
# See: https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
22+
echo "EC_INSTALL_PATH=${{ runner.temp }}/editorconfig-checker" >> "$GITHUB_ENV"
23+
24+
- name: Checkout repository
25+
uses: actions/checkout@v2
26+
27+
- name: Install Task
28+
uses: arduino/setup-task@v1
29+
with:
30+
repo-token: ${{ secrets.GITHUB_TOKEN }}
31+
version: 3.x
32+
33+
- name: Download latest editorconfig-checker release binary package
34+
id: download
35+
uses: MrOctopus/download-asset-action@1.0
36+
with:
37+
repository: editorconfig-checker/editorconfig-checker
38+
excludes: prerelease, draft
39+
asset: linux-amd64.tar.gz
40+
target: ${{ env.EC_INSTALL_PATH }}
41+
42+
- name: Install editorconfig-checker
43+
run: |
44+
cd "${{ env.EC_INSTALL_PATH }}"
45+
tar --extract --file="${{ steps.download.outputs.name }}"
46+
# Give the binary a standard name
47+
mv "${{ env.EC_INSTALL_PATH }}/bin/ec-linux-amd64" "${{ env.EC_INSTALL_PATH }}/bin/ec"
48+
# Add installation to PATH:
49+
# See: https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#adding-a-system-path
50+
echo "${{ env.EC_INSTALL_PATH }}/bin" >> "$GITHUB_PATH"
51+
52+
- name: Check formatting
53+
run: task --silent general:check-formatting

‎.github/workflows/check-license.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-license.md
2+
name: Check License
3+
4+
env:
5+
EXPECTED_LICENSE_FILENAME: LICENSE.txt
6+
# SPDX identifier: https://spdx.org/licenses/
7+
EXPECTED_LICENSE_TYPE: GPL-3.0
8+
9+
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
10+
on:
11+
push:
12+
paths:
13+
- ".github/workflows/check-license.ya?ml"
14+
# See: https://github.com/licensee/licensee/blob/master/docs/what-we-look-at.md#detecting-the-license-file
15+
- "[cC][oO][pP][yY][iI][nN][gG]*"
16+
- "[cC][oO][pP][yY][rR][iI][gG][hH][tH]*"
17+
- "[lL][iI][cC][eE][nN][cCsS][eE]*"
18+
- "[oO][fF][lL]*"
19+
- "[pP][aA][tT][eE][nN][tT][sS]*"
20+
pull_request:
21+
paths:
22+
- ".github/workflows/check-license.ya?ml"
23+
- "[cC][oO][pP][yY][iI][nN][gG]*"
24+
- "[cC][oO][pP][yY][rR][iI][gG][hH][tH]*"
25+
- "[lL][iI][cC][eE][nN][cCsS][eE]*"
26+
- "[oO][fF][lL]*"
27+
- "[pP][aA][tT][eE][nN][tT][sS]*"
28+
workflow_dispatch:
29+
repository_dispatch:
30+
31+
jobs:
32+
check-license:
33+
runs-on: ubuntu-latest
34+
35+
steps:
36+
- name: Checkout repository
37+
uses: actions/checkout@v2
38+
39+
- name: Install Ruby
40+
uses: ruby/setup-ruby@v1
41+
with:
42+
ruby-version: ruby # Install latest version
43+
44+
- name: Install licensee
45+
run: gem install licensee
46+
47+
- name: Check license file
48+
run: |
49+
EXIT_STATUS=0
50+
# See: https://github.com/licensee/licensee
51+
LICENSEE_OUTPUT="$(licensee detect --json --confidence=100)"
52+
53+
DETECTED_LICENSE_FILE="$(echo "$LICENSEE_OUTPUT" | jq .matched_files[0].filename | tr --delete '\r')"
54+
echo "Detected license file: $DETECTED_LICENSE_FILE"
55+
if [ "$DETECTED_LICENSE_FILE" != "\"${EXPECTED_LICENSE_FILENAME}\"" ]; then
56+
echo "::error file=${DETECTED_LICENSE_FILE}::detected license file $DETECTED_LICENSE_FILE doesn't match expected: $EXPECTED_LICENSE_FILENAME"
57+
EXIT_STATUS=1
58+
fi
59+
60+
DETECTED_LICENSE_TYPE="$(echo "$LICENSEE_OUTPUT" | jq .matched_files[0].matched_license | tr --delete '\r')"
61+
echo "Detected license type: $DETECTED_LICENSE_TYPE"
62+
if [ "$DETECTED_LICENSE_TYPE" != "\"${EXPECTED_LICENSE_TYPE}\"" ]; then
63+
echo "::error file=${DETECTED_LICENSE_FILE}::detected license type $DETECTED_LICENSE_TYPE doesn't match expected \"${EXPECTED_LICENSE_TYPE}\""
64+
EXIT_STATUS=1
65+
fi
66+
67+
exit $EXIT_STATUS
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-markdown-task.md
2+
name: Check Markdown
3+
4+
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
5+
on:
6+
push:
7+
paths:
8+
- ".github/workflows/check-markdown-task.ya?ml"
9+
- ".markdown-link-check.json"
10+
- "Taskfile.ya?ml"
11+
- "**/.markdownlint*"
12+
- "**.mdx?"
13+
- "**.mkdn"
14+
- "**.mdown"
15+
- "**.markdown"
16+
pull_request:
17+
paths:
18+
- ".github/workflows/check-markdown-task.ya?ml"
19+
- ".markdown-link-check.json"
20+
- "Taskfile.ya?ml"
21+
- "**/.markdownlint*"
22+
- "**.mdx?"
23+
- "**.mkdn"
24+
- "**.mdown"
25+
- "**.markdown"
26+
schedule:
27+
# Run every Tuesday at 8 AM UTC to catch breakage caused by external changes.
28+
- cron: "0 8 * * TUE"
29+
workflow_dispatch:
30+
repository_dispatch:
31+
32+
jobs:
33+
lint:
34+
runs-on: ubuntu-latest
35+
36+
steps:
37+
- name: Checkout repository
38+
uses: actions/checkout@v2
39+
40+
- name: Initialize markdownlint-cli problem matcher
41+
uses: xt0rted/markdownlint-problem-matcher@v1
42+
43+
- name: Install Task
44+
uses: arduino/setup-task@v1
45+
with:
46+
repo-token: ${{ secrets.GITHUB_TOKEN }}
47+
version: 3.x
48+
49+
- name: Lint
50+
run: task markdown:lint
51+
52+
links:
53+
runs-on: ubuntu-latest
54+
55+
steps:
56+
- name: Checkout repository
57+
uses: actions/checkout@v2
58+
59+
- name: Install Task
60+
uses: arduino/setup-task@v1
61+
with:
62+
repo-token: ${{ secrets.GITHUB_TOKEN }}
63+
version: 3.x
64+
65+
- name: Check links
66+
run: task --silent markdown:check-links
Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,219 @@
1+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-prettier-formatting-task.md
2+
name: Check Prettier Formatting
3+
4+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
5+
on:
6+
push:
7+
paths:
8+
- ".github/workflows/check-prettier-formatting-task.ya?ml"
9+
- "Taskfile.ya?ml"
10+
- "**/.prettierignore"
11+
- "**/.prettierrc*"
12+
# CSS
13+
- "**.css"
14+
- "**.wxss"
15+
# PostCSS
16+
- "**.pcss"
17+
- "**.postcss"
18+
# Less
19+
- "**.less"
20+
# SCSS
21+
- "**.scss"
22+
# GraphQL
23+
- "**.graphqls?"
24+
- "**.gql"
25+
# handlebars
26+
- "**.handlebars"
27+
- "**.hbs"
28+
# HTML
29+
- "**.mjml"
30+
- "**.html?"
31+
- "**.html.hl"
32+
- "**.st"
33+
- "**.xht"
34+
- "**.xhtml"
35+
# Vue
36+
- "**.vue"
37+
# JavaScript
38+
- "**.flow"
39+
- "**._?jsb?"
40+
- "**.bones"
41+
- "**.cjs"
42+
- "**.es6?"
43+
- "**.frag"
44+
- "**.gs"
45+
- "**.jake"
46+
- "**.jscad"
47+
- "**.jsfl"
48+
- "**.js[ms]"
49+
- "**.[mn]js"
50+
- "**.pac"
51+
- "**.wxs"
52+
- "**.[xs]s?js"
53+
- "**.xsjslib"
54+
# JSX
55+
- "**.jsx"
56+
# TypeScript
57+
- "**.ts"
58+
# TSX
59+
- "**.tsx"
60+
# JSON
61+
- "**/.eslintrc"
62+
- "**.json"
63+
- "**.avsc"
64+
- "**.geojson"
65+
- "**.gltf"
66+
- "**.har"
67+
- "**.ice"
68+
- "**.JSON-tmLanguage"
69+
- "**.mcmeta"
70+
- "**.tfstate"
71+
- "**.topojson"
72+
- "**.webapp"
73+
- "**.webmanifest"
74+
- "**.yyp?"
75+
# JSONC
76+
- "**/.babelrc"
77+
- "**/.jscsrc"
78+
- "**/.js[hl]intrc"
79+
- "**.jsonc"
80+
- "**.sublime-*"
81+
# JSON5
82+
- "**.json5"
83+
# Markdown
84+
- "**.mdx?"
85+
- "**.markdown"
86+
- "**.mk?down"
87+
- "**.mdwn"
88+
- "**.mkdn?"
89+
- "**.ronn"
90+
- "**.workbook"
91+
# YAML
92+
- "**/.clang-format"
93+
- "**/.clang-tidy"
94+
- "**/.gemrc"
95+
- "**/glide.lock"
96+
- "**.ya?ml*"
97+
- "**.mir"
98+
- "**.reek"
99+
- "**.rviz"
100+
- "**.sublime-syntax"
101+
- "**.syntax"
102+
pull_request:
103+
paths:
104+
- ".github/workflows/check-prettier-formatting-task.ya?ml"
105+
- "Taskfile.ya?ml"
106+
- "**/.prettierignore"
107+
- "**/.prettierrc*"
108+
# CSS
109+
- "**.css"
110+
- "**.wxss"
111+
# PostCSS
112+
- "**.pcss"
113+
- "**.postcss"
114+
# Less
115+
- "**.less"
116+
# SCSS
117+
- "**.scss"
118+
# GraphQL
119+
- "**.graphqls?"
120+
- "**.gql"
121+
# handlebars
122+
- "**.handlebars"
123+
- "**.hbs"
124+
# HTML
125+
- "**.mjml"
126+
- "**.html?"
127+
- "**.html.hl"
128+
- "**.st"
129+
- "**.xht"
130+
- "**.xhtml"
131+
# Vue
132+
- "**.vue"
133+
# JavaScript
134+
- "**.flow"
135+
- "**._?jsb?"
136+
- "**.bones"
137+
- "**.cjs"
138+
- "**.es6?"
139+
- "**.frag"
140+
- "**.gs"
141+
- "**.jake"
142+
- "**.jscad"
143+
- "**.jsfl"
144+
- "**.js[ms]"
145+
- "**.[mn]js"
146+
- "**.pac"
147+
- "**.wxs"
148+
- "**.[xs]s?js"
149+
- "**.xsjslib"
150+
# JSX
151+
- "**.jsx"
152+
# TypeScript
153+
- "**.ts"
154+
# TSX
155+
- "**.tsx"
156+
# JSON
157+
- "**/.eslintrc"
158+
- "**.json"
159+
- "**.avsc"
160+
- "**.geojson"
161+
- "**.gltf"
162+
- "**.har"
163+
- "**.ice"
164+
- "**.JSON-tmLanguage"
165+
- "**.mcmeta"
166+
- "**.tfstate"
167+
- "**.topojson"
168+
- "**.webapp"
169+
- "**.webmanifest"
170+
- "**.yyp?"
171+
# JSONC
172+
- "**/.babelrc"
173+
- "**/.jscsrc"
174+
- "**/.js[hl]intrc"
175+
- "**.jsonc"
176+
- "**.sublime-*"
177+
# JSON5
178+
- "**.json5"
179+
# Markdown
180+
- "**.mdx?"
181+
- "**.markdown"
182+
- "**.mk?down"
183+
- "**.mdwn"
184+
- "**.mkdn?"
185+
- "**.ronn"
186+
- "**.workbook"
187+
# YAML
188+
- "**/.clang-format"
189+
- "**/.clang-tidy"
190+
- "**/.gemrc"
191+
- "**/glide.lock"
192+
- "**.ya?ml*"
193+
- "**.mir"
194+
- "**.reek"
195+
- "**.rviz"
196+
- "**.sublime-syntax"
197+
- "**.syntax"
198+
workflow_dispatch:
199+
repository_dispatch:
200+
201+
jobs:
202+
check:
203+
runs-on: ubuntu-latest
204+
205+
steps:
206+
- name: Checkout repository
207+
uses: actions/checkout@v2
208+
209+
- name: Install Task
210+
uses: arduino/setup-task@v1
211+
with:
212+
repo-token: ${{ secrets.GITHUB_TOKEN }}
213+
version: 3.x
214+
215+
- name: Format with Prettier
216+
run: task general:format-prettier
217+
218+
- name: Check formatting
219+
run: git diff --color --exit-code
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-shell-task.md
2+
name: Check Shell Scripts
3+
4+
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
5+
on:
6+
push:
7+
paths:
8+
- ".github/workflows/check-shell-task.ya?ml"
9+
- "Taskfile.ya?ml"
10+
- "**/.editorconfig"
11+
- "**.bash"
12+
- "**.sh"
13+
pull_request:
14+
paths:
15+
- ".github/workflows/check-shell-task.ya?ml"
16+
- "Taskfile.ya?ml"
17+
- "**/.editorconfig"
18+
- "**.bash"
19+
- "**.sh"
20+
schedule:
21+
# Run every Tuesday at 8 AM UTC to catch breakage caused by tool changes.
22+
- cron: "0 8 * * TUE"
23+
workflow_dispatch:
24+
repository_dispatch:
25+
26+
jobs:
27+
lint:
28+
name: ${{ matrix.configuration.name }}
29+
runs-on: ubuntu-latest
30+
31+
env:
32+
# See: https://github.com/koalaman/shellcheck/releases/latest
33+
SHELLCHECK_RELEASE_ASSET_SUFFIX: .linux.x86_64.tar.xz
34+
35+
strategy:
36+
fail-fast: false
37+
38+
matrix:
39+
configuration:
40+
- name: Generate problem matcher output
41+
# ShellCheck's "gcc" output format is required for annotated diffs, but inferior for humans reading the log.
42+
format: gcc
43+
# The other matrix job is used to set the result, so this job is configured to always pass.
44+
continue-on-error: true
45+
- name: ShellCheck
46+
# ShellCheck's "tty" output format is most suitable for humans reading the log.
47+
format: tty
48+
continue-on-error: false
49+
50+
steps:
51+
- name: Set environment variables
52+
run: |
53+
# See: https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
54+
echo "INSTALL_PATH=${{ runner.temp }}/shellcheck" >> "$GITHUB_ENV"
55+
56+
- name: Checkout repository
57+
uses: actions/checkout@v2
58+
59+
- name: Install Task
60+
uses: arduino/setup-task@v1
61+
with:
62+
repo-token: ${{ secrets.GITHUB_TOKEN }}
63+
version: 3.x
64+
65+
- name: Download latest ShellCheck release binary package
66+
id: download
67+
uses: MrOctopus/download-asset-action@1.0
68+
with:
69+
repository: koalaman/shellcheck
70+
excludes: prerelease, draft
71+
asset: ${{ env.SHELLCHECK_RELEASE_ASSET_SUFFIX }}
72+
target: ${{ env.INSTALL_PATH }}
73+
74+
- name: Install ShellCheck
75+
run: |
76+
cd "${{ env.INSTALL_PATH }}"
77+
tar --extract --file="${{ steps.download.outputs.name }}"
78+
EXTRACTION_FOLDER="$(basename "${{ steps.download.outputs.name }}" "${{ env.SHELLCHECK_RELEASE_ASSET_SUFFIX }}")"
79+
# Add installation to PATH:
80+
# See: https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#adding-a-system-path
81+
echo "${{ env.INSTALL_PATH }}/$EXTRACTION_FOLDER" >> "$GITHUB_PATH"
82+
83+
- name: Run ShellCheck
84+
uses: liskin/gh-problem-matcher-wrap@v1
85+
continue-on-error: ${{ matrix.configuration.continue-on-error }}
86+
with:
87+
linters: gcc
88+
run: task --silent shell:check SHELLCHECK_FORMAT=${{ matrix.configuration.format }}
89+
90+
formatting:
91+
runs-on: ubuntu-latest
92+
93+
steps:
94+
- name: Set environment variables
95+
run: |
96+
# See: https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
97+
echo "SHFMT_INSTALL_PATH=${{ runner.temp }}/shfmt" >> "$GITHUB_ENV"
98+
99+
- name: Checkout repository
100+
uses: actions/checkout@v2
101+
102+
- name: Install Task
103+
uses: arduino/setup-task@v1
104+
with:
105+
repo-token: ${{ secrets.GITHUB_TOKEN }}
106+
version: 3.x
107+
108+
- name: Download shfmt
109+
id: download
110+
uses: MrOctopus/download-asset-action@1.0
111+
with:
112+
repository: mvdan/sh
113+
excludes: prerelease, draft
114+
asset: _linux_amd64
115+
target: ${{ env.SHFMT_INSTALL_PATH }}
116+
117+
- name: Install shfmt
118+
run: |
119+
# Executable permissions of release assets are lost
120+
chmod +x "${{ env.SHFMT_INSTALL_PATH }}/${{ steps.download.outputs.name }}"
121+
# Standardize binary name
122+
mv "${{ env.SHFMT_INSTALL_PATH }}/${{ steps.download.outputs.name }}" "${{ env.SHFMT_INSTALL_PATH }}/shfmt"
123+
# Add installation to PATH:
124+
# See: https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#adding-a-system-path
125+
echo "${{ env.SHFMT_INSTALL_PATH }}" >> "$GITHUB_PATH"
126+
127+
- name: Format shell scripts
128+
run: task --silent shell:format
129+
130+
- name: Check formatting
131+
run: git diff --color --exit-code
132+
133+
executable:
134+
runs-on: ubuntu-latest
135+
136+
steps:
137+
- name: Checkout repository
138+
uses: actions/checkout@v2
139+
140+
- name: Install Task
141+
uses: arduino/setup-task@v1
142+
with:
143+
repo-token: ${{ secrets.GITHUB_TOKEN }}
144+
version: 3.x
145+
146+
- name: Check for non-executable scripts
147+
run: task --silent shell:check-mode

‎.github/workflows/check-taskfiles.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-taskfiles.md
2+
name: Check Taskfiles
3+
4+
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
5+
on:
6+
push:
7+
paths:
8+
- ".github/workflows/check-taskfiles.ya?ml"
9+
- "**/Taskfile.ya?ml"
10+
pull_request:
11+
paths:
12+
- ".github/workflows/check-taskfiles.ya?ml"
13+
- "**/Taskfile.ya?ml"
14+
schedule:
15+
# Run every Tuesday at 8 AM UTC to catch breakage resulting from changes to the JSON schema.
16+
- cron: "0 8 * * TUE"
17+
workflow_dispatch:
18+
repository_dispatch:
19+
20+
jobs:
21+
validate:
22+
name: Validate ${{ matrix.file }}
23+
runs-on: ubuntu-latest
24+
25+
strategy:
26+
fail-fast: false
27+
28+
matrix:
29+
file:
30+
# TODO: add paths to any additional Taskfiles here
31+
- ./**/Taskfile.yml
32+
33+
steps:
34+
- name: Checkout repository
35+
uses: actions/checkout@v2
36+
37+
- name: Download JSON schema for Taskfiles
38+
id: download-schema
39+
uses: carlosperate/download-file-action@v1.0.3
40+
with:
41+
# See: https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/taskfile.json
42+
file-url: https://json.schemastore.org/taskfile.json
43+
location: ${{ runner.temp }}/taskfile-schema
44+
45+
- name: Install JSON schema validator
46+
run: |
47+
sudo npm install \
48+
--global \
49+
ajv-cli \
50+
ajv-formats
51+
52+
- name: Validate ${{ matrix.file }}
53+
run: |
54+
# See: https://github.com/ajv-validator/ajv-cli#readme
55+
ajv validate \
56+
--all-errors \
57+
--strict=false \
58+
-c ajv-formats \
59+
-s "${{ steps.download-schema.outputs.file-path }}" \
60+
-d "${{ matrix.file }}"
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Source: https://github.com/arduino/tooling-project-assets/blob/master/workflow-templates/check-workflows-task.md
2+
name: Check Workflows
3+
4+
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
5+
on:
6+
push:
7+
paths:
8+
- ".github/workflows/*.ya?ml"
9+
- "Taskfile.ya?ml"
10+
pull_request:
11+
paths:
12+
- ".github/workflows/*.ya?ml"
13+
- "Taskfile.ya?ml"
14+
schedule:
15+
# Run every Tuesday at 8 AM UTC to catch breakage resulting from changes to the JSON schema.
16+
- cron: "0 8 * * TUE"
17+
workflow_dispatch:
18+
repository_dispatch:
19+
20+
jobs:
21+
validate:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v2
27+
28+
- name: Install Task
29+
uses: arduino/setup-task@v1
30+
with:
31+
repo-token: ${{ secrets.GITHUB_TOKEN }}
32+
version: 3.x
33+
34+
- name: Validate workflows
35+
run: task --silent ci:validate

‎.github/workflows/check-yaml-task.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-yaml-task.md
2+
name: Check YAML
3+
4+
env:
5+
# See: https://github.com/actions/setup-python/tree/v2#available-versions-of-python
6+
PYTHON_VERSION: "3.9"
7+
8+
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
9+
on:
10+
push:
11+
paths:
12+
- ".yamllint*"
13+
- "poetry.lock"
14+
- "pyproject.toml"
15+
# Source: https://github.com/ikatyang/linguist-languages/blob/master/data/YAML.json (used by Prettier)
16+
- "**/.clang-format"
17+
- "**/.clang-tidy"
18+
- "**/.gemrc"
19+
- "**/glide.lock"
20+
- "**.ya?ml*"
21+
- "**.mir"
22+
- "**.reek"
23+
- "**.rviz"
24+
- "**.sublime-syntax"
25+
- "**.syntax"
26+
pull_request:
27+
paths:
28+
- ".yamllint*"
29+
- "poetry.lock"
30+
- "pyproject.toml"
31+
# Source: https://github.com/ikatyang/linguist-languages/blob/master/data/YAML.json (used by Prettier)
32+
- "**/.clang-format"
33+
- "**/.clang-tidy"
34+
- "**/.gemrc"
35+
- "**/glide.lock"
36+
- "**.ya?ml*"
37+
- "**.mir"
38+
- "**.reek"
39+
- "**.rviz"
40+
- "**.sublime-syntax"
41+
- "**.syntax"
42+
workflow_dispatch:
43+
repository_dispatch:
44+
45+
jobs:
46+
check:
47+
name: ${{ matrix.configuration.name }}
48+
runs-on: ubuntu-latest
49+
50+
strategy:
51+
fail-fast: false
52+
53+
matrix:
54+
configuration:
55+
- name: Generate problem matcher output
56+
# yamllint's "github" output type produces annotated diffs, but is not useful to humans reading the log.
57+
format: github
58+
# The other matrix job is used to set the result, so this job is configured to always pass.
59+
continue-on-error: true
60+
- name: Check formatting
61+
# yamllint's "colored" output type is most suitable for humans reading the log.
62+
format: colored
63+
continue-on-error: false
64+
65+
steps:
66+
- name: Checkout repository
67+
uses: actions/checkout@v2
68+
69+
- name: Install Python
70+
uses: actions/setup-python@v2
71+
with:
72+
python-version: ${{ env.PYTHON_VERSION }}
73+
74+
- name: Install Poetry
75+
run: pip install poetry
76+
77+
- name: Install Task
78+
uses: arduino/setup-task@v1
79+
with:
80+
repo-token: ${{ secrets.GITHUB_TOKEN }}
81+
version: 3.x
82+
83+
- name: Check YAML
84+
continue-on-error: ${{ matrix.configuration.continue-on-error }}
85+
run: task yaml:lint YAMLLINT_FORMAT=${{ matrix.configuration.format }}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/spell-check-task.md
2+
name: Spell Check
3+
4+
env:
5+
# See: https://github.com/actions/setup-python/tree/v2#available-versions-of-python
6+
PYTHON_VERSION: "3.9"
7+
8+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
9+
on:
10+
push:
11+
pull_request:
12+
schedule:
13+
# Run every Tuesday at 8 AM UTC to catch new misspelling detections resulting from dictionary updates.
14+
- cron: "0 8 * * TUE"
15+
workflow_dispatch:
16+
repository_dispatch:
17+
18+
jobs:
19+
spellcheck:
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v2
25+
26+
- name: Install Python
27+
uses: actions/setup-python@v2
28+
with:
29+
python-version: ${{ env.PYTHON_VERSION }}
30+
31+
- name: Install Poetry
32+
run: pip install poetry
33+
34+
- name: Install Task
35+
uses: arduino/setup-task@v1
36+
with:
37+
repo-token: ${{ secrets.GITHUB_TOKEN }}
38+
version: 3.x
39+
40+
- name: Spell check
41+
run: task general:check-spelling

‎.markdown-link-check.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"retryOn429": true,
3+
"retryCount": 3,
4+
"aliveStatusCodes": [200, 206]
5+
}

‎.markdownlint.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-markdown/.markdownlint.yml
2+
# See: https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md
3+
# The code style defined in this file is the official standardized style to be used in all Arduino projects and should
4+
# not be modified.
5+
# Note: Rules disabled solely because they are redundant to Prettier are marked with a "Prettier" comment.
6+
7+
default: false
8+
MD001: false
9+
MD002: false
10+
MD003: false # Prettier
11+
MD004: false # Prettier
12+
MD005: false # Prettier
13+
MD006: false # Prettier
14+
MD007: false # Prettier
15+
MD008: false # Prettier
16+
MD009:
17+
br_spaces: 0
18+
strict: true
19+
list_item_empty_lines: false # Prettier
20+
MD010: false # Prettier
21+
MD011: true
22+
MD012: false # Prettier
23+
MD013: false
24+
MD014: false
25+
MD018: true
26+
MD019: false # Prettier
27+
MD020: true
28+
MD021: false # Prettier
29+
MD022: false # Prettier
30+
MD023: false # Prettier
31+
MD024: false
32+
MD025:
33+
level: 1
34+
front_matter_title: '^\s*"?title"?\s*[:=]'
35+
MD026: false
36+
MD027: false # Prettier
37+
MD028: false
38+
MD029:
39+
style: one
40+
MD030:
41+
ul_single: 1
42+
ol_single: 1
43+
ul_multi: 1
44+
ol_multi: 1
45+
MD031: false # Prettier
46+
MD032: false # Prettier
47+
MD033: false
48+
MD034: false
49+
MD035: false # Prettier
50+
MD036: false
51+
MD037: true
52+
MD038: true
53+
MD039: true
54+
MD040: false
55+
MD041: false
56+
MD042: true
57+
MD043: false
58+
MD044: false
59+
MD045: true
60+
MD046:
61+
style: fenced
62+
MD047: false # Prettier

‎.yamllint.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-yaml/.yamllint.yml
2+
# See: https://yamllint.readthedocs.io/en/stable/configuration.html
3+
# The code style defined in this file is the official standardized style to be used in all Arduino tooling projects and
4+
# should not be modified.
5+
# Note: Rules disabled solely because they are redundant to Prettier are marked with a "Prettier" comment.
6+
7+
rules:
8+
braces:
9+
level: error
10+
forbid: non-empty
11+
min-spaces-inside: -1 # Prettier
12+
max-spaces-inside: -1 # Prettier
13+
min-spaces-inside-empty: -1 # Prettier
14+
max-spaces-inside-empty: -1 # Prettier
15+
brackets:
16+
level: error
17+
forbid: non-empty
18+
min-spaces-inside: -1 # Prettier
19+
max-spaces-inside: -1 # Prettier
20+
min-spaces-inside-empty: -1 # Prettier
21+
max-spaces-inside-empty: -1 # Prettier
22+
colons: disable # Prettier
23+
commas: disable # Prettier
24+
comments: disable # Prettier
25+
comments-indentation: disable # Prettier
26+
document-end: disable # Prettier
27+
document-start: disable
28+
empty-lines: disable # Prettier
29+
empty-values: disable
30+
hyphens: disable # Prettier
31+
indentation: disable # Prettier
32+
key-duplicates: disable # Prettier
33+
key-ordering: disable
34+
line-length:
35+
level: warning
36+
max: 120
37+
allow-non-breakable-words: true
38+
allow-non-breakable-inline-mappings: true
39+
new-line-at-end-of-file: disable # Prettier
40+
new-lines: disable # Prettier
41+
octal-values:
42+
level: warning
43+
forbid-implicit-octal: true
44+
forbid-explicit-octal: false
45+
quoted-strings: disable
46+
trailing-spaces: disable # Prettier
47+
truthy:
48+
level: error
49+
allowed-values:
50+
- "true"
51+
- "false"
52+
- "on" # Used by GitHub Actions as a workflow key.
53+
check-keys: true
54+
55+
yaml-files:
56+
# Source: https://github.com/ikatyang/linguist-languages/blob/master/data/YAML.json (used by Prettier)
57+
- ".clang-format"
58+
- ".clang-tidy"
59+
- ".gemrc"
60+
- ".yamllint"
61+
- "glide.lock"
62+
- "*.yml"
63+
- "*.mir"
64+
- "*.reek"
65+
- "*.rviz"
66+
- "*.sublime-syntax"
67+
- "*.syntax"
68+
- "*.yaml"
69+
- "*.yaml-tmlanguage"
70+
- "*.yaml.sed"
71+
- "*.yml.mysql"
72+
73+
ignore: |
74+
/.git/

‎LICENSE.md renamed to ‎LICENSE.txt

File renamed without changes.

‎Taskfile.yml

Lines changed: 204 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,204 @@
1+
# See: https://taskfile.dev/#/usage
2+
version: "3"
3+
4+
tasks:
5+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-workflows-task/Taskfile.yml
6+
ci:validate:
7+
desc: Validate GitHub Actions workflows against their JSON schema
8+
vars:
9+
# Source: https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/github-workflow.json
10+
WORKFLOW_SCHEMA_URL: https://json.schemastore.org/github-workflow
11+
WORKFLOW_SCHEMA_PATH:
12+
sh: mktemp -t workflow-schema-XXXXXXXXXX.json
13+
WORKFLOWS_DATA_PATH: "./.github/workflows/*.{yml,yaml}"
14+
cmds:
15+
- |
16+
wget \
17+
--quiet \
18+
--output-document="{{.WORKFLOW_SCHEMA_PATH}}" \
19+
{{.WORKFLOW_SCHEMA_URL}}
20+
- |
21+
npx \
22+
--package=ajv-cli \
23+
--package=ajv-formats \
24+
ajv validate \
25+
--all-errors \
26+
--strict=false \
27+
-c ajv-formats \
28+
-s "{{.WORKFLOW_SCHEMA_PATH}}" \
29+
-d "{{.WORKFLOWS_DATA_PATH}}"
30+
31+
docs:generate:
32+
desc: Create all generated documentation content
33+
# This is an "umbrella" task used to call any documentation generation processes the project has.
34+
# It can be left empty if there are none.
35+
36+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-general-formatting-task/Taskfile.yml
37+
general:check-formatting:
38+
desc: Check basic formatting style of all files
39+
cmds:
40+
- |
41+
if ! which ec &>/dev/null; then
42+
echo "ec not found or not in PATH. Please install: https://github.com/editorconfig-checker/editorconfig-checker#installation"
43+
exit 1
44+
fi
45+
- ec
46+
47+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-prettier-formatting-task/Taskfile.yml
48+
general:format-prettier:
49+
desc: Format all supported files with Prettier
50+
cmds:
51+
- npx prettier --write .
52+
53+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/spell-check-task/Taskfile.yml
54+
general:check-spelling:
55+
desc: Check for commonly misspelled words
56+
deps:
57+
- task: poetry:install-deps
58+
cmds:
59+
- poetry run codespell
60+
61+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/spell-check-task/Taskfile.yml
62+
general:correct-spelling:
63+
desc: Correct commonly misspelled words where possible
64+
deps:
65+
- task: poetry:install-deps
66+
cmds:
67+
- poetry run codespell --write-changes
68+
69+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-markdown-task/Taskfile.yml
70+
markdown:check-links:
71+
desc: Check for broken links
72+
deps:
73+
- task: docs:generate
74+
cmds:
75+
- |
76+
if [[ "{{.OS}}" == "Windows_NT" ]]; then
77+
# npx --call uses the native shell, which makes it too difficult to use npx for this application on Windows,
78+
# so the Windows user is required to have markdown-link-check installed and in PATH.
79+
if ! which markdown-link-check &>/dev/null; then
80+
echo "markdown-link-check not found or not in PATH. Please install: https://github.com/tcort/markdown-link-check#readme"
81+
exit 1
82+
fi
83+
# Default behavior of the task on Windows is to exit the task when the first broken link causes a non-zero
84+
# exit status, but it's better to check all links before exiting.
85+
set +o errexit
86+
STATUS=0
87+
# Using -regex instead of -name to avoid Task's behavior of globbing even when quoted on Windows
88+
# The odd method for escaping . in the regex is required for windows compatibility because mvdan.cc/sh gives
89+
# \ characters special treatment on Windows in an attempt to support them as path separators.
90+
for file in $(find . -regex ".*[.]md"); do
91+
markdown-link-check \
92+
--quiet \
93+
--config "./.markdown-link-check.json" \
94+
"$file"
95+
STATUS=$(( $STATUS + $? ))
96+
done
97+
exit $STATUS
98+
else
99+
npx --package=markdown-link-check --call='
100+
STATUS=0
101+
for file in $(find . -regex ".*[.]md"); do
102+
markdown-link-check \
103+
--quiet \
104+
--config "./.markdown-link-check.json" \
105+
"$file"
106+
STATUS=$(( $STATUS + $? ))
107+
done
108+
exit $STATUS
109+
'
110+
fi
111+
112+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-markdown-task/Taskfile.yml
113+
markdown:fix:
114+
desc: Automatically correct linting violations in Markdown files where possible
115+
cmds:
116+
- npx markdownlint-cli --fix "**/*.md"
117+
118+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-markdown-task/Taskfile.yml
119+
markdown:lint:
120+
desc: Check for problems in Markdown files
121+
cmds:
122+
- npx markdownlint-cli "**/*.md"
123+
124+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/poetry-task/Taskfile.yml
125+
poetry:install-deps:
126+
desc: Install dependencies managed by Poetry
127+
cmds:
128+
- poetry install --no-root
129+
130+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-shell-task/Taskfile.yml
131+
shell:check:
132+
desc: Check for problems with shell scripts
133+
cmds:
134+
- |
135+
if ! which shellcheck &>/dev/null; then
136+
echo "shellcheck not installed or not in PATH. Please install: https://github.com/koalaman/shellcheck#installing"
137+
exit 1
138+
fi
139+
- |
140+
# There is something odd about shellcheck that causes the task to always exit on the first fail, despite any
141+
# measures that would prevent this with any other command. So it's necessary to call shellcheck only once with
142+
# the list of script paths as an argument. This could lead to exceeding the maximum command length on Windows if
143+
# the repository contained a large number of scripts, but it's unlikely to happen in reality.
144+
shellcheck \
145+
--format={{default "tty" .SHELLCHECK_FORMAT}} \
146+
$(
147+
# The odd method for escaping . in the regex is required for windows compatibility because mvdan.cc/sh gives
148+
# \ characters special treatment on Windows in an attempt to support them as path separators.
149+
find . \
150+
-path ".git" -prune -or \
151+
\( \
152+
-regextype posix-extended \
153+
-regex '.*[.](bash|sh)' -and \
154+
-type f \
155+
\)
156+
)
157+
158+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-shell-task/Taskfile.yml
159+
shell:check-mode:
160+
desc: Check for non-executable shell scripts
161+
cmds:
162+
- |
163+
EXIT_STATUS=0
164+
while read -r nonExecutableScriptPath; do
165+
# The while loop always runs once, even if no file was found
166+
if [[ "$nonExecutableScriptPath" == "" ]]; then
167+
continue
168+
fi
169+
170+
echo "::error file=${nonExecutableScriptPath}::non-executable script file: $nonExecutableScriptPath";
171+
EXIT_STATUS=1
172+
done <<<"$(
173+
# The odd approach to escaping `.` in the regex is required for windows compatibility because mvdan.cc/sh
174+
# gives `\` characters special treatment on Windows in an attempt to support them as path separators.
175+
find . \
176+
-path ".git" -prune -or \
177+
\( \
178+
-regextype posix-extended \
179+
-regex '.*[.](bash|sh)' -and \
180+
-type f -and \
181+
-not -executable \
182+
-print \
183+
\)
184+
)"
185+
exit $EXIT_STATUS
186+
187+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-shell-task/Taskfile.yml
188+
shell:format:
189+
desc: Format shell script files
190+
cmds:
191+
- |
192+
if ! which shfmt &>/dev/null; then
193+
echo "shfmt not installed or not in PATH. Please install: https://github.com/mvdan/sh#shfmt"
194+
exit 1
195+
fi
196+
- shfmt -w .
197+
198+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-yaml-task/Taskfile.yml
199+
yaml:lint:
200+
desc: Check for problems with YAML files
201+
deps:
202+
- task: poetry:install-deps
203+
cmds:
204+
- poetry run yamllint --format {{default "colored" .YAMLLINT_FORMAT}} .

‎deploy.sh

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/bin/bash -xe
2-
GIT_REV=`git log --pretty=format:'%h' -n 1`
3-
BUILD_DATE=`date +%Y-%m-%d:%H:%M:%S`
4-
COMPILEINFO=`echo +$GIT_REV+$BUILD_DATE | tr -d '"'`
2+
GIT_REV="$(git log --pretty=format:'%h' -n 1)"
3+
BUILD_DATE="$(date +%Y-%m-%d:%H:%M:%S)"
4+
COMPILEINFO="$(echo "+${GIT_REV}+${BUILD_DATE}" | tr -d '"')"
55

6-
VERSION=`cat main.go| grep "const AppVersion" |cut -f4 -d " " | tr -d '"'`
6+
VERSION="$(grep "const AppVersion" main.go | cut -f4 -d " " | tr -d '"')"
77

88
#Remember to set GOROOT accordingly with your installation
99

@@ -16,28 +16,26 @@ declare -a target_folders=("linux_amd64" "linux_386" "linux_arm" "darwin_amd64"
1616

1717
mkdir distrib
1818

19-
for folder in "${target_folders[@]}"
20-
do
21-
IFS=_ read -a fields <<< $folder
22-
mkdir -p distrib/$folder/bin/
23-
GOOS=${fields[0]} GOARCH=${fields[1]} go build -o distrib/$folder/bin/arduinoOTA -ldflags "-X main.compileInfo=$COMPILEINFO" main.go
19+
for folder in "${target_folders[@]}"; do
2420

21+
IFS=_ read -r -a fields <<<"$folder"
22+
mkdir -p "distrib/${folder}/bin/"
23+
GOOS="${fields[0]}" GOARCH="${fields[1]}" go build -o "distrib/${folder}/bin/arduinoOTA" -ldflags "-X main.compileInfo=$COMPILEINFO" main.go
2524
done
2625

2726
#Fix windows binary extension
2827
mv distrib/windows_386/bin/arduinoOTA distrib/windows_386/bin/arduinoOTA.exe
2928

3029
cd distrib
3130

32-
for folder in "${target_folders[@]}"
33-
do
34-
mv $folder arduinoOTA
35-
if [[ $folder == "windows_386" ]]; then
36-
zip -r arduinoOTA-$VERSION-$folder.zip arduinoOTA/
37-
else
38-
tar cjf arduinoOTA-$VERSION-$folder.tar.bz2 arduinoOTA/
39-
fi
40-
rm -rf arduinoOTA
31+
for folder in "${target_folders[@]}"; do
32+
mv "$folder" arduinoOTA
33+
if [[ $folder == "windows_386" ]]; then
34+
zip -r "arduinoOTA-${VERSION}-${folder}.zip" arduinoOTA/
35+
else
36+
tar cjf "arduinoOTA-${VERSION}-${folder}.tar.bz2" arduinoOTA/
37+
fi
38+
rm -rf arduinoOTA
4139
done
4240

4341
echo =======
@@ -46,4 +44,3 @@ echo =======
4644
sha256sum arduinoOTA*
4745
echo =======
4846
shasum arduinoOTA*
49-

‎poetry.lock

Lines changed: 88 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pyproject.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[tool.poetry]
2+
name = "arduinoOTA"
3+
version = "0.0.0"
4+
description = ""
5+
authors = []
6+
7+
[tool.poetry.dependencies]
8+
python = "^3.9"
9+
10+
[tool.poetry.dev-dependencies]
11+
yamllint = "^1.26.3"
12+
codespell = "^2.1.0"
13+
14+
[build-system]
15+
requires = ["poetry-core>=1.0.0"]
16+
build-backend = "poetry.core.masonry.api"

0 commit comments

Comments
 (0)
Please sign in to comment.