Skip to content

Commit

Permalink
git subrepo pull cli
Browse files Browse the repository at this point in the history
subrepo:
  subdir:   "cli"
  merged:   "dbe561b866"
upstream:
  origin:   "[email protected]:daisy/pipeline-cli-go.git"
  branch:   "master"
  commit:   "8a451bd990"
git-subrepo:
  version:  "0.3.1"
  origin:   "???"
  commit:   "???"
  • Loading branch information
bertfrees committed Jan 22, 2024
1 parent 5ec38b3 commit 1014405
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 4 deletions.
43 changes: 43 additions & 0 deletions cli/.github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: compile for all platforms
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '^1.21.3'
- name: Set up Java
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
- name: Cache downloaded Go dependencies
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Cache downloaded Java dependencies
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build
run: mvn --batch-mode clean verify
- name: Upload the artifacts
uses: actions/upload-artifact@v3
with:
name: "cli"
path: target/*.zip
2 changes: 1 addition & 1 deletion cli/.gitrepo
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
remote = [email protected]:daisy/pipeline-cli-go.git
branch = master
commit = 8a451bd9901cf3cdcf33ba77a19fcdebf877818e
parent = 9e2ae21c0e28f749e7acdb27bf9e9728d84ad4e4
parent = e9c9599885487e09b61129aad660edfecdeafa2b
cmdver = 0.3.1
2 changes: 1 addition & 1 deletion cli/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

const (
VERSION = "2.1.8-SNAPSHOT"
VERSION = "2.1.8"
)

const (
Expand Down
15 changes: 15 additions & 0 deletions cli/cli/scripts.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,8 @@ func optionTypeToString(optionType pipeline.DataType, optionName string, default
}
case pipeline.XsInteger:
return italic("INTEGER")
case pipeline.XsNonNegativeInteger:
return italic("NON-NEGATIVE-INTEGER")
case pipeline.Choice:
var choices []string
for _, value := range t.Values {
Expand Down Expand Up @@ -378,6 +380,12 @@ func optionTypeToDetailedHelp(optionType pipeline.DataType) string {
} else {
help += "An _INTEGER_"
}
case pipeline.XsNonNegativeInteger:
if t.Documentation != "" {
help += t.Documentation
} else {
help += "An non-negative _INTEGER_"
}
case pipeline.Choice:
help += "One of the following:\n"
for _, value := range t.Values {
Expand Down Expand Up @@ -506,6 +514,13 @@ func validateOption(value string, optionType pipeline.DataType, link *PipelineLi
}
case pipeline.XsInteger:
_, err = strconv.ParseInt(value, 0, 0)
case pipeline.XsNonNegativeInteger:
var i int64
i, err = strconv.ParseInt(value, 0, 0)
if (i < 0) {
err = errors.New("does not match " + uncolor(optionTypeToString(t, "", "") + ": value is negative"))
return
}
case pipeline.XsAnyURI:
// _, err = url.Parse(value)
case pipeline.AnyFileURI:
Expand Down
3 changes: 2 additions & 1 deletion cli/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ require (
github.com/bertfrees/go-subcommand v0.0.0-20230119135135-b5e2f5321a24
github.com/capitancambio/chalk v0.0.0-20160127153406-9dc2af224a17
github.com/capitancambio/restclient v0.0.0-20150219172137-547c7b5e0857
github.com/daisy/pipeline-clientlib-go v0.0.0-20200427151931-aad11eb63a65
// go get github.com/daisy/pipeline-clientlib-go@be58359f0d
github.com/daisy/pipeline-clientlib-go v0.0.0-20231222112022-be58359f0dc7
github.com/hashicorp/go-version v1.0.0
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0
github.com/mattn/goveralls v0.0.11
Expand Down
6 changes: 6 additions & 0 deletions cli/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ github.com/capitancambio/restclient v0.0.0-20150219172137-547c7b5e0857 h1:JjwRXa
github.com/capitancambio/restclient v0.0.0-20150219172137-547c7b5e0857/go.mod h1:vKGyQZIyL/Ryo5QkEXw1xQIaLiJ/h/wionfFdXLc+5o=
github.com/daisy/pipeline-clientlib-go v0.0.0-20200427151931-aad11eb63a65 h1:9/5fuP+lIM7KgFs3aMInV8LABZIZH2cjn/lUr2WNxaM=
github.com/daisy/pipeline-clientlib-go v0.0.0-20200427151931-aad11eb63a65/go.mod h1:EqAuNzs3I84oUiMMlo787kGYRaNKozEPMfThpfj+sW8=
github.com/daisy/pipeline-clientlib-go v0.0.0-20231222103214-f83d7b8bf58f h1:0NlVgoyQ4+HnTspaFKokVCGII/LglfUyVv1ZLVVGGeg=
github.com/daisy/pipeline-clientlib-go v0.0.0-20231222103214-f83d7b8bf58f/go.mod h1:EqAuNzs3I84oUiMMlo787kGYRaNKozEPMfThpfj+sW8=
github.com/daisy/pipeline-clientlib-go v0.0.0-20231222110436-b4071cde0d7f h1:RpHcpLJLnxzxYTOlTbHbJR4a4YpijJzfAyU2BUKH7LE=
github.com/daisy/pipeline-clientlib-go v0.0.0-20231222110436-b4071cde0d7f/go.mod h1:EqAuNzs3I84oUiMMlo787kGYRaNKozEPMfThpfj+sW8=
github.com/daisy/pipeline-clientlib-go v0.0.0-20231222112022-be58359f0dc7 h1:7UrPVu10K/PzN7YYmF7hYpzrqklTovHpLEWjQBK8U0s=
github.com/daisy/pipeline-clientlib-go v0.0.0-20231222112022-be58359f0dc7/go.mod h1:EqAuNzs3I84oUiMMlo787kGYRaNKozEPMfThpfj+sW8=
github.com/hashicorp/go-version v1.0.0 h1:21MVWPKDphxa7ineQQTrCU5brh7OuVVAzGOCnnCPtE8=
github.com/hashicorp/go-version v1.0.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uiaSepXwyf3o52HaUYcV+Tu66S3F5GA=
Expand Down
6 changes: 5 additions & 1 deletion cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>org.daisy.pipeline</groupId>
<artifactId>cli</artifactId>
<version>2.1.8-SNAPSHOT</version>
<version>2.1.8</version>
<packaging>pom</packaging>
<name>DAISY Pipeline 2 :: Command Line Interface</name>
<description>Command Line Interface for the DAISY Pipeline 2.</description>
Expand Down Expand Up @@ -101,4 +101,8 @@
</plugin>
</plugins>
</build>

<scm>
<tag>v2.1.8</tag>
</scm>
</project>

0 comments on commit 1014405

Please sign in to comment.