Commit 37a23e39 authored by Silvano Cerza's avatar Silvano Cerza Committed by Silvano Cerza

[skip changelog] Update release process (#1148)

* [skip changelog] Ditch goreleaser in favor of a new release process

* [skip changelog] Fix version output test

* [skip changelog] Fix some workflows issues

* [skip changelog] Fix panic when running integration tests

* [skip changelog] Remove extra chars from package name prefix
parent 41faa0cd
......@@ -24,6 +24,7 @@ jobs:
uses: Arduino/actions/setup-taskfile@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
- name: Run task i18n:push
run: task i18n:push
......
......@@ -28,6 +28,7 @@ jobs:
uses: Arduino/actions/setup-taskfile@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
- name: Run task i18n:pull
run: task i18n:pull
......
......@@ -20,6 +20,7 @@ jobs:
uses: Arduino/actions/setup-taskfile@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
- name: Install Go
uses: actions/setup-go@v2
......
......@@ -12,22 +12,22 @@ jobs:
if: github.repository == 'arduino/arduino-cli'
runs-on: ubuntu-latest
container:
image: arduino/arduino-cli:builder-1
volumes:
# cache go dependencies across pipeline's steps
- ${{ github.workspace }}/go:/go
steps:
- name: checkout
uses: actions/checkout@v1
with:
fetch-depth: 0
- name: build
- name: Install Taskfile
uses: arduino/actions/setup-taskfile@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
- name: Build
env:
PACKAGE_NAME_PREFIX: ${{ github.workflow }}
run: goreleaser --snapshot
NIGHTLY: true
run: task dist:all
- name: Upload artifacts
uses: actions/upload-artifact@v2
......@@ -77,14 +77,14 @@ jobs:
- name: Re-package binary and update checksum
# This step performs the following:
# 1. Repackage the signed binary replaced in place by Gon (ignoring the output zip file)
# 2. Recalculate package checksum and replace it in the goreleaser nnnnnn-checksums.txt file
# 2. Recalculate package checksum and replace it in the nnnnnn-checksums.txt file
run: |
# GitHub's upload/download-artifact@v1 actions don't preserve file permissions,
# so we need to add execution permission back until @v2 actions are released.
chmod +x dist/arduino_cli_osx_darwin_amd64/arduino-cli
chmod +x dist/arduino-cli_osx_darwin_amd64/arduino-cli
PACKAGE_FILENAME="$(basename dist/arduino-cli_${{ github.workflow }}-*_macOS_64bit.tar.gz)"
tar -czvf dist/$PACKAGE_FILENAME \
-C dist/arduino_cli_osx_darwin_amd64/ arduino-cli \
-C dist/arduino-cli_osx_darwin_amd64/ arduino-cli \
-C ../../ LICENSE.txt
CLI_CHECKSUM=$(shasum -a 256 dist/$PACKAGE_FILENAME | cut -d " " -f 1)
perl -pi -w -e "s/.*${PACKAGE_FILENAME}/${CLI_CHECKSUM} ${PACKAGE_FILENAME}/g;" dist/*-checksums.txt
......
......@@ -47,6 +47,7 @@ jobs:
uses: Arduino/actions/setup-taskfile@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
- name: Setup Go
uses: actions/setup-go@v2
......
......@@ -23,6 +23,7 @@ jobs:
uses: Arduino/actions/setup-taskfile@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
- name: Activate Python
uses: actions/setup-python@v1
......
......@@ -9,20 +9,28 @@ jobs:
create-release-artifacts:
runs-on: ubuntu-latest
container:
image: arduino/arduino-cli:builder-1
volumes:
# cache go dependencies across pipeline's steps
- ${{ github.workspace }}/go:/go
steps:
- name: Checkout
uses: actions/checkout@v1
with:
fetch-depth: 0
- name: Create changelog
uses: arduino/create-changelog@1.2.0
with:
tag-regex: '^[0-9]+\.[0-9]+\.[0-9]+$'
filter-regex: '^\[(skip|changelog)[ ,-](skip|changelog)\].*'
case-insensitive-regex: true
changelog-file-path: "dist/CHANGELOG.md"
- name: Install Taskfile
uses: arduino/actions/setup-taskfile@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
- name: Build
run: goreleaser
run: task dist:all
- name: Upload artifacts
uses: actions/upload-artifact@v2
......@@ -72,14 +80,14 @@ jobs:
- name: Re-package binary and update checksum
# This step performs the following:
# 1. Repackage the signed binary replaced in place by Gon (ignoring the output zip file)
# 2. Recalculate package checksum and replace it in the goreleaser nnnnnn-checksums.txt file
# 2. Recalculate package checksum and replace it in the nnnnnn-checksums.txt file
run: |
# GitHub's upload/download-artifact@v1 actions don't preserve file permissions,
# so we need to add execution permission back until @v2 actions are released.
chmod +x dist/arduino_cli_osx_darwin_amd64/arduino-cli
chmod +x dist/arduino-cli_osx_darwin_amd64/arduino-cli
TAG=${GITHUB_REF/refs\/tags\//}
tar -czvf dist/arduino-cli_${TAG}_macOS_64bit.tar.gz \
-C dist/arduino_cli_osx_darwin_amd64/ arduino-cli \
-C dist/arduino-cli_osx_darwin_amd64/ arduino-cli \
-C ../../ LICENSE.txt
CLI_CHECKSUM=$(shasum -a 256 dist/arduino-cli_${TAG}_macOS_64bit.tar.gz | cut -d " " -f 1)
perl -pi -w -e "s/.*arduino-cli_${TAG}_macOS_64bit.tar.gz/${CLI_CHECKSUM} arduino-cli_${TAG}_macOS_64bit.tar.gz/g;" dist/*-checksums.txt
......
......@@ -39,6 +39,7 @@ jobs:
uses: Arduino/actions/setup-taskfile@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
- name: Install Python
uses: actions/setup-python@v1
......@@ -105,28 +106,27 @@ jobs:
runs-on: ubuntu-latest
needs: test-matrix
container:
image: arduino/arduino-cli:builder-1
volumes:
# cache go dependencies across pipeline's steps
- ${{ github.workspace }}/go:/go
steps:
- name: checkout
uses: actions/checkout@v1
with:
fetch-depth: 0
- name: build
shell: bash
- name: Install Taskfile
uses: arduino/actions/setup-taskfile@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
- name: Build
run: |
PACKAGE_NAME_PREFIX="${{ github.workflow }}"
if [ "${{ github.event_name }}" = "pull_request" ]; then
PACKAGE_NAME_PREFIX="$PACKAGE_NAME_PREFIX-${{ github.event.number }}"
fi
PACKAGE_NAME_PREFIX="$PACKAGE_NAME_PREFIX-${{ github.sha }}"
PACKAGE_NAME_PREFIX="$PACKAGE_NAME_PREFIX-${{ github.sha }}-"
export PACKAGE_NAME_PREFIX
goreleaser --snapshot
task dist:all
# Uploads all architectures as separate artifacts
- name: Upload Linux 32 bit artifact
......
......@@ -34,6 +34,7 @@ jobs:
uses: Arduino/actions/setup-taskfile@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
- name: Setup Go
uses: actions/setup-go@v2
......
......@@ -28,6 +28,7 @@ jobs:
uses: Arduino/actions/setup-taskfile@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
- name: Verify formatting of all files
run: task docs:check config:check
# Global section
checksum:
name_template: '{{ .Tag }}-{{ time "20060102" }}-checksums.txt'
snapshot:
name_template: '{{ .Env.PACKAGE_NAME_PREFIX }}-{{ time "20060102" }}'
release:
disable: true
changelog:
filters:
exclude:
# [skip changelog], [skip-changelog], [changelog skip], [changelog-skip]
- '^(?i)\[(skip|changelog)[ ,-](skip|changelog)\].*'
# [skip ci], [skip-ci], [ci skip], [ci-skip]
- '^(?i)\[(skip|ci)[ ,-](skip|ci)\].*'
# We have multiple builds in order to fine tune
# cross compilations.
builds:
- # OSX
id: arduino_cli_osx
binary: arduino-cli
env:
- CGO_ENABLED=1
- CXXFLAGS="-mmacosx-version-min=10.10"
- CC=/usr/x86_64-apple-darwin14/bin/cc
goos:
- darwin
goarch:
- amd64
ldflags:
- -s -w
- -X github.com/arduino/arduino-cli/version.versionString={{.Tag}}
- -X github.com/arduino/arduino-cli/version.commit={{ .ShortCommit }}
- -X github.com/arduino/arduino-cli/version.date={{.Date}}
- # ARM
id: arduino_cli_arm
binary: arduino-cli
env:
- CGO_ENABLED=1
- CC=/usr/arm-linux-gnueabi/bin/cc
goos:
- linux
goarch:
- arm
goarm:
- 6
ldflags:
- -s -w
- -X github.com/arduino/arduino-cli/version.versionString={{.Tag}}
- -X github.com/arduino/arduino-cli/version.commit={{ .ShortCommit }}
- -X github.com/arduino/arduino-cli/version.date={{.Date}}
- "-extldflags '-static'"
- # ARMv7
id: arduino_cli_armv7
binary: arduino-cli
env:
- CGO_ENABLED=1
- CC=/usr/arm-linux-gnueabihf/bin/cc
goos:
- linux
goarch:
- arm
goarm:
- 7
ldflags:
- -s -w
- -X github.com/arduino/arduino-cli/version.versionString={{.Tag}}
- -X github.com/arduino/arduino-cli/version.commit={{ .ShortCommit }}
- -X github.com/arduino/arduino-cli/version.date={{.Date}}
- "-extldflags '-static'"
- # ARM64
id: arduino_cli_arm64
binary: arduino-cli
env:
- CGO_ENABLED=1
- CC=/usr/aarch64-linux-gnu/bin/cc
goos:
- linux
goarch:
- arm64
ldflags:
- -s -w
- -X github.com/arduino/arduino-cli/version.versionString={{.Tag}}
- -X github.com/arduino/arduino-cli/version.commit={{ .ShortCommit }}
- -X github.com/arduino/arduino-cli/version.date={{.Date}}
- "-extldflags '-static'"
- # All the other platforms
id: arduino_cli
binary: arduino-cli
env:
- CGO_ENABLED=0
goos:
- linux
- windows
goarch:
- amd64
- 386
ldflags:
- -s -w
- -X github.com/arduino/arduino-cli/version.versionString={{.Tag}}
- -X github.com/arduino/arduino-cli/version.commit={{ .ShortCommit }}
- -X github.com/arduino/arduino-cli/version.date={{.Date}}
- "-extldflags '-static'"
archives:
- id: "arduino_cli"
format: tar.gz
format_overrides:
- goos: windows
format: zip
replacements:
amd64: 64bit
darwin: macOS
386: 32bit
arm: ARM
arm64: ARM64
linux: Linux
windows: Windows
files:
- LICENSE.txt
version: "3"
# This taskfile is ideally meant to be project agnostic and could be dropped in
# on other Go projects with minimal or no changes.
#
# To use it simply add the following lines to your main taskfile:
# includes:
# dist: ./DistTasks.yml
#
# The following variables must be declared in the including taskfile for the
# build process to work correctly:
# * DIST_DIR: the folder that will contain the final binaries and packages
# * PROJECT_NAME: the name of the project, used in package name
# * VERSION: the version of the project, used in package name and checksum file
# * LD_FLAGS: flags used at build time
#
# The project MUST contain a LICENSE.txt file in the root folder or packaging will fail.
tasks:
all:
desc: Build for distribution for all platforms
cmds:
- task: Windows_32bit
- task: Windows_64bit
- task: Linux_32bit
- task: Linux_64bit
- task: Linux_ARMv6
- task: Linux_ARMv7
- task: Linux_ARM64
- task: macOS_64bit
Windows_32bit:
desc: Builds Windows 32 bit binaries
dir: "{{ .DIST_DIR }}"
cmds:
- |
docker run -v `pwd`/..:/home/build -w /home/build \
-e CGO_ENABLED=1 \
{{ .CONTAINER }}:{{ .CONTAINER_TAG }} \
--build-cmd "{{ .BUILD_COMMAND }}" \
-p "{{ .BUILD_PLATFORM }}"
zip {{ .PACKAGE_NAME}} {{ .PLATFORM_DIR }}/{{ .PROJECT_NAME }}.exe ../LICENSE.txt -j
sha256sum {{ .PACKAGE_NAME }} >> {{ .CHECKSUM_FILE }}
vars:
PLATFORM_DIR: "{{ .PROJECT_NAME }}_windows_386"
BUILD_COMMAND: "go build -o {{ .DIST_DIR }}/{{ .PLATFORM_DIR }}/{{ .PROJECT_NAME }}.exe {{ .LDFLAGS }}"
BUILD_PLATFORM: "windows/386"
CONTAINER_TAG: "{{ .GO_VERSION }}-main"
PACKAGE_PLATFORM: "Windows_32bit"
PACKAGE_NAME: "{{ .PROJECT_NAME }}_{{ .VERSION }}_{{ .PACKAGE_PLATFORM }}.zip"
Windows_64bit:
desc: Builds Windows 64 bit binaries
dir: "{{ .DIST_DIR }}"
cmds:
- |
docker run -v `pwd`/..:/home/build -w /home/build \
-e CGO_ENABLED=1 \
{{ .CONTAINER }}:{{ .CONTAINER_TAG }} \
--build-cmd "{{ .BUILD_COMMAND }}" \
-p "{{ .BUILD_PLATFORM }}"
zip {{ .PACKAGE_NAME}} {{ .PLATFORM_DIR }}/{{ .PROJECT_NAME }}.exe ../LICENSE.txt -j
sha256sum {{ .PACKAGE_NAME }} >> {{ .CHECKSUM_FILE }}
vars:
PLATFORM_DIR: "{{ .PROJECT_NAME }}_windows_amd64"
BUILD_COMMAND: "go build -o {{ .DIST_DIR }}/{{ .PLATFORM_DIR }}/{{ .PROJECT_NAME }}.exe {{ .LDFLAGS }}"
BUILD_PLATFORM: "windows/amd64"
CONTAINER_TAG: "{{ .GO_VERSION }}-main"
PACKAGE_PLATFORM: "Windows_64bit"
PACKAGE_NAME: "{{ .PROJECT_NAME }}_{{ .VERSION }}_{{ .PACKAGE_PLATFORM }}.zip"
Linux_32bit:
desc: Builds Linux 32 bit binaries
dir: "{{ .DIST_DIR }}"
cmds:
- |
docker run -v `pwd`/..:/home/build -w /home/build \
-e CGO_ENABLED=1 \
{{ .CONTAINER }}:{{ .CONTAINER_TAG }} \
--build-cmd "{{ .BUILD_COMMAND }}" \
-p "{{ .BUILD_PLATFORM }}"
tar cz -C {{ .PLATFORM_DIR }} {{ .PROJECT_NAME }} -C ../.. LICENSE.txt -f {{ .PACKAGE_NAME }}
sha256sum {{ .PACKAGE_NAME }} >> {{ .CHECKSUM_FILE }}
vars:
PLATFORM_DIR: "{{ .PROJECT_NAME }}_linux_amd32"
BUILD_COMMAND: "go build -o {{ .DIST_DIR }}/{{ .PLATFORM_DIR }}/{{ .PROJECT_NAME }} {{ .LDFLAGS }}"
BUILD_PLATFORM: "linux/386"
CONTAINER_TAG: "{{ .GO_VERSION }}-main"
PACKAGE_PLATFORM: "Linux_32bit"
PACKAGE_NAME: "{{ .PROJECT_NAME }}_{{ .VERSION }}_{{ .PACKAGE_PLATFORM }}.tar.gz"
Linux_64bit:
desc: Builds Linux 64 bit binaries
dir: "{{ .DIST_DIR }}"
cmds:
- |
docker run -v `pwd`/..:/home/build -w /home/build \
-e CGO_ENABLED=1 \
{{ .CONTAINER }}:{{ .CONTAINER_TAG }} \
--build-cmd "{{ .BUILD_COMMAND }}" \
-p "{{ .BUILD_PLATFORM }}"
tar cz -C {{ .PLATFORM_DIR }} {{ .PROJECT_NAME }} -C ../.. LICENSE.txt -f {{ .PACKAGE_NAME }}
sha256sum {{ .PACKAGE_NAME }} >> {{ .CHECKSUM_FILE }}
vars:
PLATFORM_DIR: "{{ .PROJECT_NAME }}_linux_amd64"
BUILD_COMMAND: "go build -o {{ .DIST_DIR }}/{{ .PLATFORM_DIR }}/{{ .PROJECT_NAME }} {{ .LDFLAGS }}"
BUILD_PLATFORM: "linux/amd64"
CONTAINER_TAG: "{{ .GO_VERSION }}-main"
PACKAGE_PLATFORM: "Linux_64bit"
PACKAGE_NAME: "{{ .PROJECT_NAME }}_{{ .VERSION }}_{{ .PACKAGE_PLATFORM }}.tar.gz"
Linux_ARMv7:
desc: Builds Linux ARMv7 binaries
dir: "{{ .DIST_DIR }}"
cmds:
- |
docker run -v `pwd`/..:/home/build -w /home/build \
-e CGO_ENABLED=1 \
{{ .CONTAINER }}:{{ .CONTAINER_TAG }} \
--build-cmd "{{ .BUILD_COMMAND }}" \
-p "{{ .BUILD_PLATFORM }}"
tar cz -C {{ .PLATFORM_DIR }} {{ .PROJECT_NAME }} -C ../.. LICENSE.txt -f {{ .PACKAGE_NAME }}
sha256sum {{ .PACKAGE_NAME }} >> {{ .CHECKSUM_FILE }}
vars:
PLATFORM_DIR: "{{ .PROJECT_NAME }}_linux_arm_7"
BUILD_COMMAND: "go build -o {{ .DIST_DIR }}/{{ .PLATFORM_DIR }}/{{ .PROJECT_NAME }} {{ .LDFLAGS }}"
BUILD_PLATFORM: "linux/armv7"
CONTAINER_TAG: "{{ .GO_VERSION }}-arm"
PACKAGE_PLATFORM: "Linux_ARMv7"
PACKAGE_NAME: "{{ .PROJECT_NAME }}_{{ .VERSION }}_{{ .PACKAGE_PLATFORM }}.tar.gz"
Linux_ARMv6:
desc: Builds Linux ARMv6 binaries
dir: "{{ .DIST_DIR }}"
cmds:
- |
docker run -v `pwd`/..:/home/build -w /home/build \
-e CGO_ENABLED=1 \
{{ .CONTAINER }}:{{ .CONTAINER_TAG }} \
--build-cmd "{{ .BUILD_COMMAND }}" \
-p "{{ .BUILD_PLATFORM }}"
tar cz -C {{ .PLATFORM_DIR }} {{ .PROJECT_NAME }} -C ../.. LICENSE.txt -f {{ .PACKAGE_NAME }}
sha256sum {{ .PACKAGE_NAME }} >> {{ .CHECKSUM_FILE }}
vars:
PLATFORM_DIR: "{{ .PROJECT_NAME }}_linux_arm_6"
BUILD_COMMAND: "go build -o {{ .DIST_DIR }}/{{ .PLATFORM_DIR }}/{{ .PROJECT_NAME }} {{ .LDFLAGS }}"
BUILD_PLATFORM: "linux/armv6"
CONTAINER_TAG: "{{ .GO_VERSION }}-arm"
PACKAGE_PLATFORM: "Linux_ARMv6"
PACKAGE_NAME: "{{ .PROJECT_NAME }}_{{ .VERSION }}_{{ .PACKAGE_PLATFORM }}.tar.gz"
Linux_ARM64:
desc: Builds Linux ARM64 binaries
dir: "{{ .DIST_DIR }}"
cmds:
- |
docker run -v `pwd`/..:/home/build -w /home/build \
-e CGO_ENABLED=1 \
{{ .CONTAINER }}:{{ .CONTAINER_TAG }} \
--build-cmd "{{ .BUILD_COMMAND }}" \
-p "{{ .BUILD_PLATFORM }}"
tar cz -C {{ .PLATFORM_DIR }} {{ .PROJECT_NAME }} -C ../.. LICENSE.txt -f {{ .PACKAGE_NAME }}
sha256sum {{ .PACKAGE_NAME }} >> {{ .CHECKSUM_FILE }}
vars:
PLATFORM_DIR: "{{ .PROJECT_NAME }}_linux_arm_6"
BUILD_COMMAND: "go build -o {{ .DIST_DIR }}/{{ .PLATFORM_DIR }}/{{ .PROJECT_NAME }} {{ .LDFLAGS }}"
BUILD_PLATFORM: "linux/arm64"
CONTAINER_TAG: "{{ .GO_VERSION }}-arm"
PACKAGE_PLATFORM: "Linux_ARM64"
PACKAGE_NAME: "{{ .PROJECT_NAME }}_{{ .VERSION }}_{{ .PACKAGE_PLATFORM }}.tar.gz"
macOS_64bit:
desc: Builds Mac OS X 64 bit binaries
dir: "{{ .DIST_DIR }}"
cmds:
- |
docker run -v `pwd`/..:/home/build -w /home/build \
-e CGO_ENABLED=1 \
{{ .CONTAINER }}:{{ .CONTAINER_TAG }} \
--build-cmd "{{ .BUILD_COMMAND }}" \
-p "{{ .BUILD_PLATFORM }}"
tar cz -C {{ .PLATFORM_DIR }} {{ .PROJECT_NAME }} -C ../.. LICENSE.txt -f {{ .PACKAGE_NAME }}
sha256sum {{ .PACKAGE_NAME }} >> {{ .CHECKSUM_FILE }}
vars:
PLATFORM_DIR: "{{ .PROJECT_NAME }}_osx_darwin_amd64"
BUILD_COMMAND: "go build -o {{ .DIST_DIR }}/{{ .PLATFORM_DIR }}/{{ .PROJECT_NAME }} {{ .LDFLAGS }}"
BUILD_PLATFORM: "darwin/amd64"
CONTAINER_TAG: "{{ .GO_VERSION }}-darwin"
PACKAGE_PLATFORM: "macOS_64bit"
PACKAGE_NAME: "{{ .PROJECT_NAME }}_{{ .VERSION }}_{{ .PACKAGE_PLATFORM }}.tar.gz"
vars:
CONTAINER: "docker.elastic.co/beats-dev/golang-crossbuild"
GO_VERSION: "1.14.7"
CHECKSUM_FILE: "{{ .VERSION }}-checksums.txt"
FROM multiarch/crossbuild
ENV PATH $PATH:/usr/local/go/bin
# Install tooling
ENV GORELEASER_VER 0.113.0
ENV GORELEASER_SHA 2379beebb6369b75ccead7f7a43269de700b51821feae3857701d106ed72bd63
ENV GOVER 1.14
RUN set -ex \
&& curl -o goreleaser.tar.gz -LO https://github.com/goreleaser/goreleaser/releases/download/v${GORELEASER_VER}/goreleaser_Linux_x86_64.tar.gz \
&& echo "$GORELEASER_SHA goreleaser.tar.gz" | sha256sum -c - || exit 1 \
&& tar -xzf goreleaser.tar.gz -C /usr/bin/ goreleaser \
&& rm goreleaser.tar.gz \
&& curl -LO https://dl.google.com/go/go${GOVER}.linux-amd64.tar.gz \
&& tar -C /usr/local -xzf go${GOVER}.linux-amd64.tar.gz \
&& rm go${GOVER}.linux-amd64.tar.gz
version: "2"
version: "3"
includes:
dist: ./DistTasks.yml
tasks:
docs:gen:commands:
......@@ -196,25 +199,39 @@ tasks:
- git diff --exit-code ./i18n/data &> /dev/null || (cd ./i18n && rice embed-go)
vars:
PROJECT_NAME: "arduino-cli"
DIST_DIR: "dist"
# all modules of this project except for "legacy/..." module
DEFAULT_TARGETS:
sh: echo `go list ./... | grep -v legacy | tr '\n' ' '`
# build vars
COMMIT:
sh: echo ${TRAVIS_COMMIT:-`git log -n 1 --format=%h`}
sh: echo "$(git log -n 1 --format=%h)"
TIMESTAMP:
sh: echo "$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
TIMESTAMP_SHORT:
sh: echo "{{now | date "20060102"}}"
TAG:
sh: echo "`git tag --points-at=HEAD 2> /dev/null`"
VERSION: "{{ if .NIGHTLY }}nightly-{{ .TIMESTAMP_SHORT }}{{ else if .TAG }}{{ .TAG }}{{ else }}{{ .PACKAGE_NAME_PREFIX }}git-snapshot{{ end }}"
LDFLAGS: >
-ldflags '-X github.com/arduino/arduino-cli/version.commit={{.COMMIT}}
-X github.com/arduino/arduino-cli/version.date={{.TIMESTAMP}}'
-ldflags
'
-X github.com/arduino/arduino-cli/version.versionString={{.VERSION}}
-X github.com/arduino/arduino-cli/version.commit={{ .COMMIT }}
-X github.com/arduino/arduino-cli/version.date={{.TIMESTAMP}}
'
# test vars
GOFLAGS: "-timeout 10m -v -coverpkg=./... -covermode=atomic"
TEST_VERSIONSTRING: "0.0.0-test.preview"
TEST_VERSION: "0.0.0-test.preview"
TEST_COMMIT: "deadbeef"
TEST_LDFLAGS: >
-ldflags '-X github.com/arduino/arduino-cli/version.versionString={{.TEST_VERSIONSTRING}}
-ldflags
'
-X github.com/arduino/arduino-cli/version.versionString={{.TEST_VERSION}}
-X github.com/arduino/arduino-cli/version.commit={{.TEST_COMMIT}}
-X github.com/arduino/arduino-cli/version.date={{.TIMESTAMP}}'
-X github.com/arduino/arduino-cli/version.date={{.TIMESTAMP}}
'
# check-lint vars
GOLINTBIN:
sh: go list -f {{"{{"}}".Target{{"}}"}}" golang.org/x/lint/golint
......
......@@ -106,13 +106,14 @@ If you’re familiar with Golang or if you want to contribute to the project, yo
locally with your Go toolchain. Please refer to the [CONTRIBUTING] document for setup instructions.
If you don’t have a working Golang environment or if you want to build `arduino-cli` targeting different platforms, you
can use Docker to get a binary directly from sources. From the project folder run:
can use [Task][task-site] to get a binary directly from sources. From the project folder run:
```sh
docker run -v $PWD:/arduino-cli -w /arduino-cli -e PACKAGE_NAME_PREFIX='snapshot' arduino/arduino-cli:builder-1 goreleaser --rm-dist --snapshot --skip-publish
task dist:all
```
Once the build is over, you will find a `./dist/` folder containing the packages built out of the current source tree.
[git for windows]: https://gitforwindows.org/
[contributing]: CONTRIBUTING.md
[task-site]: https://taskfile.dev/#/installation
source = ["dist/arduino_cli_osx_darwin_amd64/arduino-cli"]
source = ["dist/arduino-cli_osx_darwin_amd64/arduino-cli"]
bundle_id = "cc.arduino.arduino-cli"
sign {
......
[[package]]
category = "main"
description = "apipkg: namespace control and lazy-import mechanism"
name = "apipkg"
version = "1.5"
description = "apipkg: namespace control and lazy-import mechanism"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
version = "1.5"
[[package]]
category = "main"
description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
name = "appdirs"
version = "1.4.4"
description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
category = "main"
optional = false
python-versions = "*"
version = "1.4.4"
[[package]]
category = "main"
description = "Atomic file writes."
marker = "sys_platform == \"win32\""
name = "atomicwrites"
version = "1.4.0"
description = "Atomic file writes."
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
version = "1.4.0"
[[package]]
category = "main"
description = "Classes Without Boilerplate"
name = "attrs"
version = "19.3.0"
description = "Classes Without Boilerplate"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
version = "19.3.0"
[package.extras]
azure-pipelines = ["coverage", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface", "pytest-azurepipelines"]
......@@ -38,12 +37,12 @@ docs = ["sphinx", "zope.interface"]
tests = ["coverage", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface"]
[[package]]
category = "main"
description = "The uncompromising code formatter."
name = "black"
version = "19.10b0"
description = "The uncompromising code formatter."
category = "main"
optional = false
python-versions = ">=3.6"
version = "19.10b0"
[package.dependencies]
appdirs = "*"
......@@ -58,45 +57,44 @@ typed-ast = ">=1.4.0"
d = ["aiohttp (>=3.3.2)", "aiohttp-cors"]
[[package]]
category = "main"
description = "Python package for providing Mozilla's CA Bundle."
name = "certifi"
version = "2020.6.20"
description = "Python package for providing Mozilla's CA Bundle."
category = "main"
optional = false
python-versions = "*"
version = "2020.6.20"
[[package]]
category = "main"
description = "Universal encoding detector for Python 2 and 3"
name = "chardet"
version = "3.0.4"
description = "Universal encoding detector for Python 2 and 3"
category = "main"
optional = false
python-versions = "*"
version = "3.0.4"
[[package]]
category = "main"
description = "Composable command line interface toolkit"
name = "click"
version = "7.1.2"
description = "Composable command line interface toolkit"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
version = "7.1.2"
[[package]]
category = "main"
description = "Cross-platform colored terminal text."
marker = "sys_platform == \"win32\""
name = "colorama"
version = "0.4.3"
description = "Cross-platform colored terminal text."
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
version = "0.4.3"
[[package]]
category = "main"
description = "execnet: rapid multi-Python deployment"
name = "execnet"
version = "1.7.1"
description = "execnet: rapid multi-Python deployment"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
version = "1.7.1"
[package.dependencies]
apipkg = ">=1.4"
......@@ -105,20 +103,20 @@ apipkg = ">=1.4"
testing = ["pre-commit"]
[[package]]
category = "main"
description = "A platform independent file lock."
name = "filelock"
version = "3.0.12"
description = "A platform independent file lock."
category = "main"
optional = false
python-versions = "*"
version = "3.0.12"
[[package]]
category = "main"
description = "the modular source code checker: pep8 pyflakes and co"
name = "flake8"
version = "3.8.3"
description = "the modular source code checker: pep8 pyflakes and co"
category = "main"
optional = false
python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7"
version = "3.8.3"
[package.dependencies]
mccabe = ">=0.6.0,<0.7.0"
......@@ -126,139 +124,161 @@ pycodestyle = ">=2.6.0a1,<2.7.0"
pyflakes = ">=2.2.0,<2.3.0"
[[package]]
name = "gitdb"
version = "4.0.5"
description = "Git Object Database"
category = "main"
description = "Internationalized Domain Names in Applications (IDNA)"
optional = false
python-versions = ">=3.4"
[package.dependencies]
smmap = ">=3.0.1,<4"
[[package]]
name = "gitpython"
version = "3.1.12"
description = "Python Git Library"
category = "main"
optional = false
python-versions = ">=3.4"
[package.dependencies]
gitdb = ">=4.0.1,<5"
[[package]]
name = "idna"
version = "2.8"
description = "Internationalized Domain Names in Applications (IDNA)"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
version = "2.8"
[[package]]
category = "main"
description = "iniconfig: brain-dead simple config-ini parsing"
name = "iniconfig"
version = "1.0.1"
description = "iniconfig: brain-dead simple config-ini parsing"
category = "main"
optional = false
python-versions = "*"
version = "1.0.1"
[[package]]
category = "main"
description = "Pythonic task execution"
name = "invoke"
version = "1.4.1"
description = "Pythonic task execution"
category = "main"
optional = false
python-versions = "*"
version = "1.4.1"
[[package]]
category = "main"
description = "McCabe checker, plugin for flake8"
name = "mccabe"
version = "0.6.1"
description = "McCabe checker, plugin for flake8"
category = "main"
optional = false
python-versions = "*"
version = "0.6.1"
[[package]]
category = "main"
description = "More routines for operating on iterables, beyond itertools"
name = "more-itertools"
version = "8.4.0"
description = "More routines for operating on iterables, beyond itertools"
category = "main"
optional = false
python-versions = ">=3.5"
version = "8.4.0"
[[package]]
category = "main"
description = "Core utilities for Python packages"
name = "packaging"
version = "20.4"
description = "Core utilities for Python packages"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
version = "20.4"
[package.dependencies]
pyparsing = ">=2.0.2"
six = "*"
[[package]]
category = "main"
description = "Utility library for gitignore style pattern matching of file paths."
name = "pathspec"
version = "0.8.0"
description = "Utility library for gitignore style pattern matching of file paths."
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
version = "0.8.0"
[[package]]
category = "main"
description = "plugin and hook calling mechanisms for python"
name = "pluggy"
version = "0.13.1"
description = "plugin and hook calling mechanisms for python"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
version = "0.13.1"
[package.extras]
dev = ["pre-commit", "tox"]
[[package]]
category = "main"
description = "Python client for the Prometheus monitoring system."
name = "prometheus-client"
version = "0.7.1"
description = "Python client for the Prometheus monitoring system."
category = "main"
optional = false
python-versions = "*"
version = "0.7.1"
[package.extras]
twisted = ["twisted"]
[[package]]
category = "main"
description = "library with cross-python path, ini-parsing, io, code, log facilities"
name = "py"
version = "1.9.0"
description = "library with cross-python path, ini-parsing, io, code, log facilities"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
version = "1.9.0"
[[package]]
category = "main"
description = "Python style guide checker"
name = "pycodestyle"
version = "2.6.0"
description = "Python style guide checker"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
version = "2.6.0"
[[package]]
category = "main"
description = "passive checker of Python programs"
name = "pyflakes"
version = "2.2.0"
description = "passive checker of Python programs"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
version = "2.2.0"
[[package]]
category = "main"
description = "Python parsing module"
name = "pyparsing"
version = "2.4.7"
description = "Python parsing module"
category = "main"
optional = false
python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*"
version = "2.4.7"
[[package]]
category = "main"
description = "Python Serial Port Extension"
name = "pyserial"
version = "3.4"
description = "Python Serial Port Extension"
category = "main"
optional = false
python-versions = "*"
version = "3.4"
[[package]]
category = "main"
description = "pytest: simple powerful testing with Python"
name = "pytest"
version = "6.0.2"
description = "pytest: simple powerful testing with Python"
category = "main"
optional = false
python-versions = ">=3.5"
version = "6.0.2"
[package.dependencies]
atomicwrites = ">=1.0"
atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""}
attrs = ">=17.4.0"
colorama = "*"
colorama = {version = "*", markers = "sys_platform == \"win32\""}
iniconfig = "*"
more-itertools = ">=4.0.0"
packaging = "*"
......@@ -267,28 +287,28 @@ py = ">=1.8.2"
toml = "*"
[package.extras]
checkqa_mypy = ["mypy (0.780)"]
checkqa_mypy = ["mypy (==0.780)"]
testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"]
[[package]]
category = "main"
description = "run tests in isolated forked subprocesses"
name = "pytest-forked"
version = "1.3.0"
description = "run tests in isolated forked subprocesses"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
version = "1.3.0"
[package.dependencies]
py = "*"
pytest = ">=3.10"
[[package]]
category = "main"
description = "pytest-httpserver is a httpserver for pytest"
name = "pytest-httpserver"
version = "0.3.5"
description = "pytest-httpserver is a httpserver for pytest"
category = "main"
optional = false
python-versions = ">=3.4"
version = "0.3.5"
[package.dependencies]
werkzeug = "*"
......@@ -298,23 +318,23 @@ dev = ["autopep8", "coverage", "flake8", "ipdb", "pytest", "pytest-cov", "reno",
test = ["coverage", "pytest", "pytest-cov", "requests"]
[[package]]
category = "main"
description = "py.test plugin to abort hanging tests"
name = "pytest-timeout"
version = "1.3.4"
description = "py.test plugin to abort hanging tests"
category = "main"
optional = false
python-versions = "*"
version = "1.3.4"
[package.dependencies]
pytest = ">=3.6.0"
[[package]]
category = "main"
description = "pytest xdist plugin for distributed testing and loop-on-failing modes"
name = "pytest-xdist"
version = "2.1.0"
description = "pytest xdist plugin for distributed testing and loop-on-failing modes"
category = "main"
optional = false
python-versions = ">=3.5"
version = "2.1.0"
[package.dependencies]
execnet = ">=1.1"
......@@ -326,28 +346,28 @@ psutil = ["psutil (>=3.0)"]
testing = ["filelock"]
[[package]]
category = "main"
description = "YAML parser and emitter for Python"
name = "pyyaml"
version = "5.3"
description = "YAML parser and emitter for Python"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
version = "5.3"
[[package]]
category = "main"
description = "Alternative regular expression module, to replace re."
name = "regex"
version = "2020.7.14"
description = "Alternative regular expression module, to replace re."
category = "main"
optional = false
python-versions = "*"
version = "2020.7.14"
[[package]]
category = "main"
description = "Python HTTP for Humans."
name = "requests"
version = "2.22.0"
description = "Python HTTP for Humans."
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
version = "2.22.0"
[package.dependencies]
certifi = ">=2017.4.17"
......@@ -357,76 +377,85 @@ urllib3 = ">=1.21.1,<1.25.0 || >1.25.0,<1.25.1 || >1.25.1,<1.26"
[package.extras]
security = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)"]
socks = ["PySocks (>=1.5.6,<1.5.7 || >1.5.7)", "win-inet-pton"]
socks = ["PySocks (>=1.5.6,!=1.5.7)", "win-inet-pton"]
[[package]]
category = "main"
description = "Python helper for Semantic Versioning (http://semver.org/)"
name = "semver"
version = "2.13.0"
description = "Python helper for Semantic Versioning (http://semver.org/)"
category = "main"
optional = false
python-versions = "*"
version = "2.9.0"
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
[[package]]
category = "main"
description = "Simple, fast, extensible JSON encoder/decoder for Python"
name = "simplejson"
version = "3.17.0"
description = "Simple, fast, extensible JSON encoder/decoder for Python"
category = "main"
optional = false
python-versions = ">=2.5, !=3.0.*, !=3.1.*, !=3.2.*"
version = "3.17.0"
[[package]]
category = "main"
description = "Python 2 and 3 compatibility utilities"
name = "six"
version = "1.15.0"
description = "Python 2 and 3 compatibility utilities"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*"
version = "1.15.0"
[[package]]
name = "smmap"
version = "3.0.4"
description = "A pure Python implementation of a sliding window memory map manager"
category = "main"
description = "Python Library for Tom's Obvious, Minimal Language"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
[[package]]
name = "toml"
version = "0.10.1"
description = "Python Library for Tom's Obvious, Minimal Language"
category = "main"
optional = false
python-versions = "*"
version = "0.10.1"
[[package]]
category = "main"
description = "a fork of Python 2 and 3 ast modules with type comment support"
name = "typed-ast"
version = "1.4.1"
description = "a fork of Python 2 and 3 ast modules with type comment support"
category = "main"
optional = false
python-versions = "*"
version = "1.4.1"
[[package]]
category = "main"
description = "HTTP library with thread-safe connection pooling, file post, and more."
name = "urllib3"
version = "1.25.9"
description = "HTTP library with thread-safe connection pooling, file post, and more."
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4"
version = "1.25.9"
[package.extras]
brotli = ["brotlipy (>=0.6.0)"]
secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "pyOpenSSL (>=0.14)", "ipaddress"]
socks = ["PySocks (>=1.5.6,<1.5.7 || >1.5.7,<2.0)"]
socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"]
[[package]]
category = "main"
description = "The comprehensive WSGI web application library."
name = "werkzeug"
version = "1.0.1"
description = "The comprehensive WSGI web application library."
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
version = "1.0.1"
[package.extras]
dev = ["pytest", "pytest-timeout", "coverage", "tox", "sphinx", "pallets-sphinx-themes", "sphinx-issues"]
watchdog = ["watchdog"]
[metadata]
content-hash = "3500e684ec97eabc4ffd38614f8e9af23630e1650f5ff095ad031396a8b2acf2"
lock-version = "1.1"
python-versions = "^3.8"
content-hash = "a987a9f86a55ef8203013e0da6ce71788ff7cf6e96ea44b76c8f1e1b00a17dc2"
[metadata.files]
apipkg = [
......@@ -477,6 +506,14 @@ flake8 = [
{file = "flake8-3.8.3-py2.py3-none-any.whl", hash = "sha256:15e351d19611c887e482fb960eae4d44845013cc142d42896e9862f775d8cf5c"},
{file = "flake8-3.8.3.tar.gz", hash = "sha256:f04b9fcbac03b0a3e58c0ab3a0ecc462e023a9faf046d57794184028123aa208"},
]
gitdb = [
{file = "gitdb-4.0.5-py3-none-any.whl", hash = "sha256:91f36bfb1ab7949b3b40e23736db18231bf7593edada2ba5c3a174a7b23657ac"},
{file = "gitdb-4.0.5.tar.gz", hash = "sha256:c9e1f2d0db7ddb9a704c2a0217be31214e91a4fe1dea1efad19ae42ba0c285c9"},
]
gitpython = [
{file = "GitPython-3.1.12-py3-none-any.whl", hash = "sha256:867ec3dfb126aac0f8296b19fb63b8c4a399f32b4b6fafe84c4b10af5fa9f7b5"},
{file = "GitPython-3.1.12.tar.gz", hash = "sha256:42dbefd8d9e2576c496ed0059f3103dcef7125b9ce16f9d5f9c834aed44a1dac"},
]
idna = [
{file = "idna-2.8-py2.py3-none-any.whl", hash = "sha256:ea8b7f6188e6fa117537c3df7da9fc686d485087abf6ac197f9c46432f7e4a3c"},
{file = "idna-2.8.tar.gz", hash = "sha256:c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407"},
......@@ -594,8 +631,8 @@ requests = [
{file = "requests-2.22.0.tar.gz", hash = "sha256:11e007a8a2aa0323f5a921e9e6a2d7e4e67d9877e85773fba9ba6419025cbeb4"},
]
semver = [
{file = "semver-2.9.0-py2.py3-none-any.whl", hash = "sha256:aa1c6be3bf23e346e00c509a7ee87735a7e0fd6b404cf066037cfeab2c770320"},
{file = "semver-2.9.0.tar.gz", hash = "sha256:ed1edeaa0c27f68feb74f09f715077fd07b728446dc2bb7fc470fc0f737873a0"},
{file = "semver-2.13.0-py2.py3-none-any.whl", hash = "sha256:ced8b23dceb22134307c1b8abfa523da14198793d9787ac838e70e29e77458d4"},
{file = "semver-2.13.0.tar.gz", hash = "sha256:fa0fe2722ee1c3f57eac478820c3a5ae2f624af8264cbdf9000c980ff7f75e3f"},
]
simplejson = [
{file = "simplejson-3.17.0-cp27-cp27m-macosx_10_13_x86_64.whl", hash = "sha256:87d349517b572964350cc1adc5a31b493bbcee284505e81637d0174b2758ba17"},
......@@ -631,6 +668,10 @@ six = [
{file = "six-1.15.0-py2.py3-none-any.whl", hash = "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced"},
{file = "six-1.15.0.tar.gz", hash = "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259"},
]
smmap = [
{file = "smmap-3.0.4-py2.py3-none-any.whl", hash = "sha256:54c44c197c819d5ef1991799a7e30b662d1e520f2ac75c9efbeb54a742214cf4"},
{file = "smmap-3.0.4.tar.gz", hash = "sha256:9c98bbd1f9786d22f14b3d4126894d56befb835ec90cef151af566c7e19b5d24"},
]
toml = [
{file = "toml-0.10.1-py2.py3-none-any.whl", hash = "sha256:bda89d5935c2eac546d648028b9901107a595863cb36bae0c73ac804a9b4ce88"},
{file = "toml-0.10.1.tar.gz", hash = "sha256:926b612be1e5ce0634a2ca03470f95169cf16f939018233a670519cb4ac58b0f"},
......@@ -643,19 +684,28 @@ typed-ast = [
{file = "typed_ast-1.4.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:269151951236b0f9a6f04015a9004084a5ab0d5f19b57de779f908621e7d8b75"},
{file = "typed_ast-1.4.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:24995c843eb0ad11a4527b026b4dde3da70e1f2d8806c99b7b4a7cf491612652"},
{file = "typed_ast-1.4.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:fe460b922ec15dd205595c9b5b99e2f056fd98ae8f9f56b888e7a17dc2b757e7"},
{file = "typed_ast-1.4.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:fcf135e17cc74dbfbc05894ebca928ffeb23d9790b3167a674921db19082401f"},
{file = "typed_ast-1.4.1-cp36-cp36m-win32.whl", hash = "sha256:4e3e5da80ccbebfff202a67bf900d081906c358ccc3d5e3c8aea42fdfdfd51c1"},
{file = "typed_ast-1.4.1-cp36-cp36m-win_amd64.whl", hash = "sha256:249862707802d40f7f29f6e1aad8d84b5aa9e44552d2cc17384b209f091276aa"},
{file = "typed_ast-1.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8ce678dbaf790dbdb3eba24056d5364fb45944f33553dd5869b7580cdbb83614"},
{file = "typed_ast-1.4.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:c9e348e02e4d2b4a8b2eedb48210430658df6951fa484e59de33ff773fbd4b41"},
{file = "typed_ast-1.4.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:bcd3b13b56ea479b3650b82cabd6b5343a625b0ced5429e4ccad28a8973f301b"},
{file = "typed_ast-1.4.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:f208eb7aff048f6bea9586e61af041ddf7f9ade7caed625742af423f6bae3298"},
{file = "typed_ast-1.4.1-cp37-cp37m-win32.whl", hash = "sha256:d5d33e9e7af3b34a40dc05f498939f0ebf187f07c385fd58d591c533ad8562fe"},
{file = "typed_ast-1.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:0666aa36131496aed8f7be0410ff974562ab7eeac11ef351def9ea6fa28f6355"},
{file = "typed_ast-1.4.1-cp38-cp38-macosx_10_15_x86_64.whl", hash = "sha256:d205b1b46085271b4e15f670058ce182bd1199e56b317bf2ec004b6a44f911f6"},
{file = "typed_ast-1.4.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:6daac9731f172c2a22ade6ed0c00197ee7cc1221aa84cfdf9c31defeb059a907"},
{file = "typed_ast-1.4.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:498b0f36cc7054c1fead3d7fc59d2150f4d5c6c56ba7fb150c013fbc683a8d2d"},
{file = "typed_ast-1.4.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:7e4c9d7658aaa1fc80018593abdf8598bf91325af6af5cce4ce7c73bc45ea53d"},
{file = "typed_ast-1.4.1-cp38-cp38-win32.whl", hash = "sha256:715ff2f2df46121071622063fc7543d9b1fd19ebfc4f5c8895af64a77a8c852c"},
{file = "typed_ast-1.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:fc0fea399acb12edbf8a628ba8d2312f583bdbdb3335635db062fa98cf71fca4"},
{file = "typed_ast-1.4.1-cp39-cp39-macosx_10_15_x86_64.whl", hash = "sha256:d43943ef777f9a1c42bf4e552ba23ac77a6351de620aa9acf64ad54933ad4d34"},
{file = "typed_ast-1.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:92c325624e304ebf0e025d1224b77dd4e6393f18aab8d829b5b7e04afe9b7a2c"},
{file = "typed_ast-1.4.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:d648b8e3bf2fe648745c8ffcee3db3ff903d0817a01a12dd6a6ea7a8f4889072"},
{file = "typed_ast-1.4.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:fac11badff8313e23717f3dada86a15389d0708275bddf766cca67a84ead3e91"},
{file = "typed_ast-1.4.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:0d8110d78a5736e16e26213114a38ca35cb15b6515d535413b090bd50951556d"},
{file = "typed_ast-1.4.1-cp39-cp39-win32.whl", hash = "sha256:b52ccf7cfe4ce2a1064b18594381bccf4179c2ecf7f513134ec2f993dd4ab395"},
{file = "typed_ast-1.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:3742b32cf1c6ef124d57f95be609c473d7ec4c14d0090e5a5e05a15269fb4d0c"},
{file = "typed_ast-1.4.1.tar.gz", hash = "sha256:8c8aaad94455178e3187ab22c8b01a3837f8ee50e09cf31f1ba129eb293ec30b"},
]
urllib3 = [
......
......@@ -8,7 +8,7 @@ authors = []
python = "^3.8"
pytest = "6.0.2"
simplejson = "3.17.0"
semver = "2.9.0"
semver = "2.13.0"
pyserial = "3.4"
pyyaml = "5.3"
prometheus-client = "0.7.1"
......
......@@ -37,7 +37,8 @@ def test_version(run_command):
assert result.ok
parsed_out = json.loads(result.stdout)
assert parsed_out.get("Application", False) == "arduino-cli"
assert isinstance(semver.parse(parsed_out.get("VersionString", False)), dict)
version = parsed_out.get("VersionString", False)
assert semver.VersionInfo.isvalid(version=version) or "git-snapshot" in version or "nightly" in version
assert isinstance(parsed_out.get("Commit", False), str)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment