Skip to content

Commit 7f8ad1f

Browse files
committed
'task build' now uses a compliant semver notation
1 parent 7dde80e commit 7f8ad1f

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

.github/workflows/publish-go-tester-task.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ jobs:
151151
uses: actions/download-artifact@v3
152152
- name: Output checksum
153153
run: |
154-
TAG="${{ needs.package-name-prefix.outputs.prefix }}git-snapshot"
154+
TAG="${{ needs.package-name-prefix.outputs.prefix }}1.0.0-snapshot"
155155
declare -a artifacts=($(ls -d */))
156156
for artifact in ${artifacts[@]}
157157
do

Taskfile.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ vars:
362362
sh: echo "{{now | date "20060102"}}"
363363
TAG:
364364
sh: echo "$(git tag --points-at=HEAD 2> /dev/null | head -n1 | sed 's/^v//')"
365-
VERSION: "{{if .NIGHTLY}}nightly-{{.TIMESTAMP_SHORT}}{{else if .TAG}}{{.TAG}}{{else}}{{.PACKAGE_NAME_PREFIX}}git-snapshot{{end}}"
365+
VERSION: "{{if .NIGHTLY}}nightly-{{.TIMESTAMP_SHORT}}{{else if .TAG}}{{.TAG}}{{else}}{{.PACKAGE_NAME_PREFIX}}1.0.0-snapshot{{end}}"
366366
CONFIGURATION_PACKAGE: "github.com/arduino/arduino-cli/version"
367367
LDFLAGS: >-
368368
-ldflags

commands/service_check_for_updates.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func (s *arduinoCoreServerImpl) CheckForArduinoCLIUpdates(ctx context.Context, r
6161
// shouldCheckForUpdate return true if it actually makes sense to check for new updates,
6262
// false in all other cases.
6363
func (s *arduinoCoreServerImpl) shouldCheckForUpdate(currentVersion *semver.Version) bool {
64-
if strings.Contains(currentVersion.String(), "git-snapshot") || strings.Contains(currentVersion.String(), "nightly") {
64+
if strings.Contains(currentVersion.String(), "1.0.0-snapshot") || strings.Contains(currentVersion.String(), "nightly") {
6565
// This is a dev build, no need to check for updates
6666
return false
6767
}

internal/cli/version/version.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func runVersionCommand(ctx context.Context, srv rpc.ArduinoCoreServiceServer) {
4848
logrus.Info("Executing `arduino-cli version`")
4949

5050
info := version.VersionInfo
51-
if strings.Contains(info.VersionString, "git-snapshot") || strings.Contains(info.VersionString, "nightly") {
51+
if strings.Contains(info.VersionString, "1.0.0-snapshot") || strings.Contains(info.VersionString, "nightly") {
5252
// We're using a development version, no need to check if there's a
5353
// new release available
5454
feedback.PrintResult(info)

internal/integrationtest/main/main_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ func TestVersion(t *testing.T) {
5858
// Checks if Application's value is arduino-cli
5959
require.Equal(t, jsonMap["Application"], "arduino-cli")
6060

61-
// Checks if VersionString's value is git-snapshot, nightly or a valid semantic versioning
61+
// Checks if VersionString's value is 1.0.0-snapshot, nightly or a valid semantic versioning
6262
switch version := jsonMap["VersionString"]; version {
63-
case "git-snapshot":
64-
require.Contains(t, version, "git-snapshot")
63+
case "1.0.0-snapshot":
64+
require.Contains(t, version, "1.0.0-snapshot")
6565
case "nightly":
6666
require.Contains(t, version, "nightly")
6767
default:

0 commit comments

Comments
 (0)