From 9a673263b36708c76005f477c2a75e8fc14e60ca Mon Sep 17 00:00:00 2001 From: per1234 Date: Thu, 5 Aug 2021 14:58:12 -0700 Subject: [PATCH 1/3] Use filename to communicate nature of unused notarization output file The project specific filename makes the file less suitable to be used as a "template" for application to any project. Since this file is not used for anything, there is no need for it to have any special name. --- gon.config.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gon.config.hcl b/gon.config.hcl index 661468f2..92cc9221 100644 --- a/gon.config.hcl +++ b/gon.config.hcl @@ -10,5 +10,5 @@ sign { # Ask Gon for zip output to force notarization process to take place. # The CI will ignore the zip output, using the signed binary only. zip { - output_path = "arduino-lint.zip" + output_path = "unused.zip" } From 3df030599db9919170c077bdab1bf3e526cde40e Mon Sep 17 00:00:00 2001 From: per1234 Date: Thu, 5 Aug 2021 15:16:01 -0700 Subject: [PATCH 2/3] Use standardized version identifier for test builds --- .github/workflows/publish-go-tester-task.yml | 2 +- Taskfile.yml | 2 +- tests/test_all.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-go-tester-task.yml b/.github/workflows/publish-go-tester-task.yml index 2c30857b..4b29ca15 100644 --- a/.github/workflows/publish-go-tester-task.yml +++ b/.github/workflows/publish-go-tester-task.yml @@ -43,7 +43,7 @@ jobs: - name: Build run: | - PACKAGE_NAME_PREFIX="${{ github.workflow }}" + PACKAGE_NAME_PREFIX="test" if [ "${{ github.event_name }}" = "pull_request" ]; then PACKAGE_NAME_PREFIX="$PACKAGE_NAME_PREFIX-${{ github.event.number }}" fi diff --git a/Taskfile.yml b/Taskfile.yml index d9c6f2d0..ad563b7f 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -19,7 +19,7 @@ vars: sh: echo "{{now | date "20060102"}}" TAG: sh: echo "$(git tag --points-at=HEAD 2> /dev/null | head -n1)" - VERSION: "{{if .NIGHTLY}}nightly-{{.TIMESTAMP_SHORT}}{{else if .TAG}}{{.TAG}}{{else}}snapshot{{end}}" + VERSION: "{{if .NIGHTLY}}nightly-{{.TIMESTAMP_SHORT}}{{else if .TAG}}{{.TAG}}{{else}}{{.PACKAGE_NAME_PREFIX}}git-snapshot{{end}}" CONFIGURATION_PACKAGE: "github.com/arduino/{{.PROJECT_NAME}}/internal/configuration" LDFLAGS: >- -ldflags diff --git a/tests/test_all.py b/tests/test_all.py index cd5536d3..e7262812 100644 --- a/tests/test_all.py +++ b/tests/test_all.py @@ -206,7 +206,7 @@ def test_version(run_command): assert result.ok output_list = result.stdout.strip().split(sep=" ") version = output_list[0] - assert semver.VersionInfo.isvalid(version=version) or version == "snapshot" or "nightly" in version + assert semver.VersionInfo.isvalid(version=version) or version == "git-snapshot" or "nightly" in version dateutil.parser.isoparse(output_list[1]) result = run_command(cmd=["--version", "--format", "json"]) @@ -214,7 +214,7 @@ def test_version(run_command): version_output = json.loads(result.stdout) if version_output["version"] != "": version = version_output["version"] - assert semver.VersionInfo.isvalid(version=version) or version == "snapshot" or "nightly" in version + assert semver.VersionInfo.isvalid(version=version) or version == "git-snapshot" or "nightly" in version assert version_output["commit"] != "" dateutil.parser.isoparse(version_output["buildTimestamp"]) From 297d9923be00f71dbca002d94b5562d69eab183a Mon Sep 17 00:00:00 2001 From: per1234 Date: Thu, 5 Aug 2021 17:31:36 -0700 Subject: [PATCH 3/3] Generate tester builds on the modification of any relevant file Tester builds are intended to facilitate pull request review and beta testing. For the sake of efficiency, the paths filter should be configured to skip tester build generation on changes that have no effect on the binary, but also so that they are always generated on any modification to a relevant file. Since the `DistTasks.yml` file is used to build the application, it is very much relevant. --- .github/workflows/publish-go-tester-task.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/publish-go-tester-task.yml b/.github/workflows/publish-go-tester-task.yml index 4b29ca15..383aecb9 100644 --- a/.github/workflows/publish-go-tester-task.yml +++ b/.github/workflows/publish-go-tester-task.yml @@ -9,6 +9,7 @@ on: - "go.mod" - "go.sum" - "Taskfile.ya?ml" + - "DistTasks.ya?ml" - "**.go" pull_request: paths: @@ -16,6 +17,7 @@ on: - "go.mod" - "go.sum" - "Taskfile.ya?ml" + - "DistTasks.ya?ml" - "**.go" workflow_dispatch: repository_dispatch: