Skip to content

Commit

Permalink
Bump github.com/compose-spec/compose-go from 1.0.9 to 1.1.0 in /src (#…
Browse files Browse the repository at this point in the history
…285)

* Bump github.com/compose-spec/compose-go from 1.0.9 to 1.1.0 in /src

Bumps [github.com/compose-spec/compose-go](https://github.com/compose-spec/compose-go) from 1.0.9 to 1.1.0.
- [Release notes](https://github.com/compose-spec/compose-go/releases)
- [Commits](compose-spec/compose-go@v1.0.9...v1.1.0)

---
updated-dependencies:
- dependency-name: github.com/compose-spec/compose-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Remove CI run for Golang 1.16

* Set min version to 1.17 in docs

* Adapt to changes of compose spec

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marc Auberer <marc.auberer@chillibits.com>
  • Loading branch information
dependabot[bot] and marcauberer committed Mar 2, 2022
1 parent 5535c96 commit a217c7c
Show file tree
Hide file tree
Showing 21 changed files with 147 additions and 67 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ jobs:
build:
strategy:
matrix:
go-version: [ 1.16.x, 1.17.x ]
os: [ ubuntu-latest, windows-latest ]
go-version:
- 1.17.x
# - 1.18.x
os:
- ubuntu-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/install/source.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ cd compose-generator
```

#### Install Go
For compiling Compose Generator from source you need to have Go 1.16 or higher installed on your system. Please refer to the [official guide](https://golang.org/doc/install) on how to install Go.
For compiling Compose Generator from source you need to have Go 1.17 or higher installed on your system. Please refer to the [official guide](https://golang.org/doc/install) on how to install Go.

### Build from source
If you want to build the executable, you can use the `build.sh` for Linux or the `build.bat` file for Windows:
Expand Down Expand Up @@ -43,4 +43,4 @@ If you don't care about the executable and you just want to use Compose Generato
### Use
```sh
compose-generator [<command>]
```
```
2 changes: 1 addition & 1 deletion src/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/briandowns/spinner v1.13.0
github.com/cli/safeexec v1.0.0
github.com/compose-generator/diu v0.0.0-20211016203144-1bbae0eb7ff8
github.com/compose-spec/compose-go v1.0.9
github.com/compose-spec/compose-go v1.1.0
github.com/docker/docker v20.10.12+incompatible
github.com/fatih/color v1.13.0
github.com/go-playground/validator/v10 v10.10.0
Expand Down
4 changes: 2 additions & 2 deletions src/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWH
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
github.com/compose-generator/diu v0.0.0-20211016203144-1bbae0eb7ff8 h1:wXkQsocCLPwqw27YQhonsK2+fu1fDLCfZHsx5nPnsys=
github.com/compose-generator/diu v0.0.0-20211016203144-1bbae0eb7ff8/go.mod h1:dtCz9JfVc0yS+V6wn1afxvk2LqEDkTnIDpmJvMYySQQ=
github.com/compose-spec/compose-go v1.0.9 h1:mLEdaXkxgO7rUJEa+WoFjwl08LuoW7PeYwey74Z3jao=
github.com/compose-spec/compose-go v1.0.9/go.mod h1:rHEHEY6CRqTAsRy+qvxWSr5GmqzgLWspRD0zloT9GOk=
github.com/compose-spec/compose-go v1.1.0 h1:n/0O7Fl90doi5AG9bfF0SOSLXtveXxLkGXblSrxVC5Q=
github.com/compose-spec/compose-go v1.1.0/go.mod h1:pAy7Mikpeft4pxkFU565/DRHEbDfR84G6AQuiL+Hdg8=
github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE=
github.com/containerd/aufs v0.0.0-20201003224125-76a6863f2989/go.mod h1:AkGGQs9NM2vtYHaUen+NljV0/baGCAPELGm2q9ZXpWU=
github.com/containerd/aufs v0.0.0-20210316121734-20793ff83c97/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU=
Expand Down
2 changes: 1 addition & 1 deletion src/pass/add/add_ports.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func AddPorts(service *spec.ServiceConfig, _ *model.CGProject) {
Mode: "ingress",
Protocol: "tcp",
Target: uint32(portInnerInt),
Published: uint32(portOuterInt),
Published: strconv.FormatUint(portOuterInt, 10),
})
infoLogger.Println("Adding port mapping " + portOuter + ":" + portInner + " to new service")
}
Expand Down
4 changes: 2 additions & 2 deletions src/pass/add/add_ports_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ func TestAddPorts1(t *testing.T) {
Mode: "ingress",
Protocol: "tcp",
Target: 80,
Published: 9090,
Published: "9090",
},
{
Mode: "ingress",
Protocol: "tcp",
Target: 81,
Published: 8081,
Published: "8081",
},
},
}
Expand Down
8 changes: 7 additions & 1 deletion src/project/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"io/ioutil"
"os/user"
"path"
"strconv"
"strings"
"time"

Expand Down Expand Up @@ -133,7 +134,12 @@ func loadComposeFile(project *model.CGProject, opt LoadOptions) {
project.Composition.WorkingDir = opt.WorkingDir
for _, service := range project.Composition.Services {
for _, port := range service.Ports {
project.Ports = append(project.Ports, int(port.Published))
portInt, err := strconv.Atoi(port.Published)
if err != nil {
errorLogger.Println("Conversion of port from string to int failed: " + err.Error())
logError("Conversion of port from string to int failed", true)
}
project.Ports = append(project.Ports, portInt)
}
}
infoLogger.Println("Loading Compose file (done)")
Expand Down
23 changes: 23 additions & 0 deletions src/vendor/github.com/compose-spec/compose-go/consts/consts.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions src/vendor/github.com/compose-spec/compose-go/dotenv/parser.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

55 changes: 46 additions & 9 deletions src/vendor/github.com/compose-spec/compose-go/loader/loader.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 11 additions & 3 deletions src/vendor/github.com/compose-spec/compose-go/loader/merge.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a217c7c

Please sign in to comment.