Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internals: move to the latest astarte-go #172

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
name: Release
runs-on: ubuntu-20.04
steps:
- name: Set up Go 1.17
- name: Set up Go 1.18
uses: actions/setup-go@v2
with:
go-version: 1.17.x
go-version: 1.18.x
- name: Checkout
uses: actions/checkout@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
name: Build and Test
strategy:
matrix:
go: [1.17.x, 1.18.x]
go: [1.18.x, 1.19.x]
os: [ubuntu-20.04, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
golang 1.17.8
golang 1.18.8
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Changed
- `cluster instance deploy`: Astarte >= `v1.0.0` is deployed using the
`api.astarte-platform.org/v1alpha2` API.
- Require at least Go 1.18 (due to astarte-go dep).
- Use Go 1.18 for releases.

### Fixed
- `appengine devices send-data` correctly parses integers as int32 instead of in64.
Expand Down
11 changes: 6 additions & 5 deletions cmd/appengine/appengine.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ import (
"errors"
"fmt"

"github.com/astarte-platform/astarte-go/astarteservices"
"github.com/astarte-platform/astarte-go/client"
"github.com/astarte-platform/astarte-go/misc"
"github.com/astarte-platform/astarte-go/deviceid"
"github.com/astarte-platform/astartectl/utils"

"github.com/spf13/cobra"
Expand Down Expand Up @@ -59,9 +60,9 @@ func appEnginePersistentPreRunE(cmd *cobra.Command, args []string) error {
return errors.New("Either astarte-url or appengine-url have to be specified")
}

individualURLVariables := map[misc.AstarteService]string{
misc.AppEngine: "individual-urls.appengine",
misc.RealmManagement: "individual-urls.realm-management",
individualURLVariables := map[astarteservices.AstarteService]string{
astarteservices.AppEngine: "individual-urls.appengine",
astarteservices.RealmManagement: "individual-urls.realm-management",
}

viper.BindPFlag("realm.key-file", cmd.Flags().Lookup("realm-key"))
Expand All @@ -85,7 +86,7 @@ func deviceIdentifierTypeFromFlags(deviceIdentifier string, forceDeviceIdentifie
case "":
return client.AutodiscoverDeviceIdentifier, nil
case "device-id":
if !misc.IsValidAstarteDeviceID(deviceIdentifier) {
if !deviceid.IsValid(deviceIdentifier) {
return 0, fmt.Errorf("Required to evaluate the Device Identifier as an Astarte Device ID, but %v isn't a valid one", deviceIdentifier)
}
return client.AstarteDeviceID, nil
Expand Down
Loading