Skip to content

Commit e899af6

Browse files
authored
Upgrade tooling to the latest generator with go generic support (Azure#17481)
* ci: update build and test script for mgmt * feat: upgrade mgmt release tool to go 1.18
1 parent 6cd9346 commit e899af6

File tree

11 files changed

+46
-22
lines changed

11 files changed

+46
-22
lines changed

eng/scripts/Invoke-MgmtTestgen.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ param(
99
[switch]$cleanGenerated,
1010
[switch]$format,
1111
[switch]$tidy,
12-
[string]$config = "autorest.md",
13-
[string]$autorestVersion = "3.7.3",
14-
[string]$goExtension = "@autorest/go@4.0.0-preview.36",
15-
[string]$testExtension = "@autorest/gotest@1.3.0",
12+
[string]$config,
13+
[string]$autorestVersion,
14+
[string]$goExtension,
15+
[string]$testExtension,
1616
[string]$outputFolder
1717
)
1818

eng/scripts/MgmtTestLib.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ function Invoke-MgmtTestgen ()
1818
[switch]$tidy,
1919
[string]$autorestPath = "",
2020
[string]$config = "autorest.md",
21-
[string]$autorestVersion = "3.6.2",
22-
[string]$goExtension = "@autorest/go@4.0.0-preview.36",
23-
[string]$testExtension = "@autorest/gotest@1.3.0",
21+
[string]$autorestVersion = "3.8.2",
22+
[string]$goExtension = "@autorest/go@4.0.0-preview.38",
23+
[string]$testExtension = "@autorest/gotest@3.0.0",
2424
[string]$outputFolder
2525
)
2626
if ($clean)

eng/scripts/build.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ param(
99
[switch]$format,
1010
[switch]$tidy,
1111
[string]$config = "autorest.md",
12-
[string]$autorestVersion = "3.7.3",
13-
[string]$goExtension = "@autorest/go@4.0.0-preview.36",
12+
[string]$autorestVersion = "3.8.2",
13+
[string]$goExtension = "@autorest/go@4.0.0-preview.38",
1414
[string]$outputFolder
1515
)
1616

eng/tools/generator/cmd/template/templateCmd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func BindFlags(flagSet *pflag.FlagSet) {
6060
flagSet.String("commit", "", "Specifies the commit hash of azure-rest-api-specs")
6161
flagSet.String("release-date", "", "Specifies the release date in changelog")
6262
flagSet.String("package-config", "", "Additional config for package")
63-
flagSet.String("go-version", "1.16", "Go version")
63+
flagSet.String("go-version", "1.18", "Go version")
6464
}
6565

6666
// ParseFlags parses the flags to a Flags struct

eng/tools/generator/cmd/v2/automation/automationCmd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func Command() *cobra.Command {
2727
return nil
2828
},
2929
RunE: func(cmd *cobra.Command, args []string) error {
30-
goVersion := "1.16"
30+
goVersion := "1.18"
3131
if len(args) == 3 {
3232
goVersion = args[2]
3333
}

eng/tools/generator/cmd/v2/refresh/refreshCmd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func BindFlags(flagSet *pflag.FlagSet) {
6262
flagSet.String("release-date", "", "Specifies the release date in changelog")
6363
flagSet.Bool("skip-create-branch", false, "Skip create release branch after generation")
6464
flagSet.Bool("skip-generate-example", false, "Skip generate example for SDK in the same time")
65-
flagSet.String("go-version", "1.16", "Go version")
65+
flagSet.String("go-version", "1.18", "Go version")
6666
flagSet.String("rps", "", "Specify RP list to refresh, seperated by ','")
6767
}
6868

eng/tools/generator/cmd/v2/release/releaseCmd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func BindFlags(flagSet *pflag.FlagSet) {
7676
flagSet.Bool("skip-create-branch", false, "Skip create release branch after generation")
7777
flagSet.Bool("skip-generate-example", false, "Skip generate example for SDK in the same time")
7878
flagSet.String("package-config", "", "Additional config for package")
79-
flagSet.String("go-version", "1.16", "Go version")
79+
flagSet.String("go-version", "1.18", "Go version")
8080
}
8181

8282
func ParseFlags(flagSet *pflag.FlagSet) Flags {

eng/tools/generator/doc.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
//go:build go1.16
2-
// +build go1.16
1+
//go:build go1.18
2+
// +build go1.18
33

44
// Copyright (c) Microsoft Corporation. All rights reserved.
55
// Licensed under the MIT License. See License.txt in the project root for license information.

eng/tools/generator/go.mod

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/Azure/azure-sdk-for-go/eng/tools/generator
22

3-
go 1.13
3+
go 1.18
44

55
require (
66
github.com/Azure/azure-sdk-for-go/eng/tools/internal v0.0.0-20210928100519-41af1bab440e
@@ -13,3 +13,27 @@ require (
1313
github.com/spf13/pflag v1.0.5
1414
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
1515
)
16+
17+
require (
18+
github.com/Microsoft/go-winio v0.4.16 // indirect
19+
github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 // indirect
20+
github.com/acomagu/bufpipe v1.0.3 // indirect
21+
github.com/emirpasic/gods v1.12.0 // indirect
22+
github.com/go-git/gcfg v1.5.0 // indirect
23+
github.com/go-git/go-billy/v5 v5.3.1 // indirect
24+
github.com/golang/protobuf v1.3.2 // indirect
25+
github.com/google/go-querystring v1.0.0 // indirect
26+
github.com/hashicorp/errwrap v1.0.0 // indirect
27+
github.com/imdario/mergo v0.3.12 // indirect
28+
github.com/inconshreveable/mousetrap v1.0.0 // indirect
29+
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
30+
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect
31+
github.com/mitchellh/go-homedir v1.1.0 // indirect
32+
github.com/sergi/go-diff v1.1.0 // indirect
33+
github.com/xanzy/ssh-agent v0.3.0 // indirect
34+
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b // indirect
35+
golang.org/x/net v0.0.0-20210326060303-6b1517762897 // indirect
36+
golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79 // indirect
37+
google.golang.org/appengine v1.6.1 // indirect
38+
gopkg.in/warnings.v0 v0.1.2 // indirect
39+
)

eng/tools/generator/go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqCl
1111
cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
1212
cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
1313
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
14-
github.com/Azure/azure-sdk-for-go v54.2.1+incompatible h1:RiwBAqYP8Xz2yTPNzrwiHX5+lfPkRlHuk/x4BOAyAjA=
1514
github.com/Azure/azure-sdk-for-go v54.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
1615
github.com/Azure/azure-sdk-for-go/eng/tools/internal v0.0.0-20210928100519-41af1bab440e h1:G4N2h9Gye3sIipThHng3wrXnctrMC/WR5Ne6lMCEyL8=
1716
github.com/Azure/azure-sdk-for-go/eng/tools/internal v0.0.0-20210928100519-41af1bab440e/go.mod h1:2vV9sTDQVI3Py0jyWZoEOYfkV5O692UaOWgPOhGS0H4=
@@ -66,7 +65,6 @@ github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8
6665
github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg=
6766
github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o=
6867
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
69-
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BHsljHzVlRcyQhjrss6TZTdY2VfCqZPbv5k3iBFa2ZQ=
7068
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
7169
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
7270
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=

0 commit comments

Comments
 (0)