summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2018-10-22 23:06:02 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2018-10-22 23:06:02 +0200
commit0012c3c7b256df7db834080740d8fc124c9dba22 (patch)
treead588fab2f8fec22060f270dc4e7a0a37335495d
parent5b9b7280b3b812f596de2cbdebce5c5877c7f50e (diff)
Display new image url field with sdk list command
Change-Id: I26db1f7ebedd502db123e249a69bad30fbc0db99 Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
-rw-r--r--.vscode/launch.json6
-rw-r--r--cmd-sdks.go10
-rw-r--r--glide.yaml2
3 files changed, 14 insertions, 4 deletions
diff --git a/.vscode/launch.json b/.vscode/launch.json
index 1fc4ed1..b792099 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -1,6 +1,8 @@
{
"version": "0.2.0",
- "configurations": [{
+ "configurations": [
+
+ {
"name": "xds-cli (version)",
"type": "go",
"request": "launch",
@@ -16,7 +18,7 @@
"showLog": false
},
{
- "name": "xds-cli (list)",
+ "name": "xds-cli sdks (list)",
"type": "go",
"request": "launch",
"mode": "debug",
diff --git a/cmd-sdks.go b/cmd-sdks.go
index 35b053e..0005215 100644
--- a/cmd-sdks.go
+++ b/cmd-sdks.go
@@ -187,7 +187,8 @@ func _displaySdks(sdks []xaapiv1.SDK, verbose bool, all bool, filter string) {
fmt.Fprintln(writer, "Version\t"+s.Version)
fmt.Fprintln(writer, "Status\t"+s.Status)
fmt.Fprintln(writer, "Path\t"+s.Path)
- fmt.Fprintln(writer, "Url\t"+s.URL)
+ fmt.Fprintln(writer, "Url\t"+formatURL(s.URL))
+ fmt.Fprintln(writer, "Image Url\t"+formatURL(s.ImageURL))
} else {
if first {
@@ -365,3 +366,10 @@ func sdksAbort(ctx *cli.Context) error {
Log.Debugf("Result of %s: %v", url, newSdk)
return nil
}
+
+func formatURL(u string) string {
+ if u == "" {
+ return "-"
+ }
+ return u
+}
diff --git a/glide.yaml b/glide.yaml
index dbae3d8..f3f181a 100644
--- a/glide.yaml
+++ b/glide.yaml
@@ -12,7 +12,7 @@ import:
- package: github.com/sebd71/go-socket.io-client
version: 46defcb47f
- package: gerrit.automotivelinux.org/gerrit/src/xds/xds-agent.git
- version: dea62f2f108934a4df26fcaaf4c0369cd881b1ba
+ version: e9c65d5fcf8d2ec3772ceced4fe1379392b15a4f
subpackages:
- lib/xaapiv1
- package: gerrit.automotivelinux.org/gerrit/src/xds/xds-common.git