5 Track 2 Module Release Process
Joel Hendrix редактировал(а) эту страницу 2021-05-03 12:36:17 -07:00
  1. Releases should ALWAYS happen in master. Any exceptions MUST be approved by the Go SDK team.
  2. Execute autorest using the track 2 code generator.
    1. autorest --use=@autorest/go@4.0.0-preview.19 <path to>/readme.md --go --tag=<tag> --go-sdk-folder=<azure-sdk-for-go local path> --module=github.com/Azure/azure-sdk-for-go/<module> --modelerfour.lenient-model-deduplication --license-header=MICROSOFT_MIT_NO_VERSION --file-prefix="zz_generated_"
  3. Update azcore to the latest version. go get -u github.com/Azure/azure-sdk-for-go/sdk/azcore@latest
  4. Run the apidiff tool to detect any breaking changes. Breaking changes REQUIRE the major version number to be bumped and the major version suffix to be added/updated in go.mod.
  5. Determine the version number of the module as per semver 2.0 rules.
    1. For a new module, the version will be v1.0.0. If it's a preview, the version will be v0.1.0.
    2. When updating an existing module, determine the latest module version by looking at the git tags for that module. git tag -l sdk/<module>/v*
    3. If updating a GA'ed module (i.e. v1.0.0+):
      1. For changes that do not impact public surface area (e.g. method bodies, comments), increment the patch version.
      2. For changes that add public surface area (e.g. new APIs), increment the minor version and reset the patch version to zero.
      3. For changes that modify public surface area (e.g. adding a new parameter to an API), increment the major version and reset the minor/patch versions to zero.
    4. If updating a preview module (i.e. v0.1.0+):
      1. For all non-breaking changes, increment the patch version.
      2. For all breaking changes, increment the minor version and reset the patch version to zero.
      3. If the preview module is being promoted to GA, set the version to v1.0.0.
  6. Update the version number in zz_generated_connection.go (don't use vscode as it mucks with formatting). E.g. in const telemetryInfo = "azsdk-go-armcompute/<version>" replace <version> with the version number determined earlier.
  7. Execute the following tools:
    1. go fmt .
    2. go build
    3. go vet
    4. go test (if applicable)
    5. go mod tidy
  8. Execute the apidiff tool using the changelog command to generate the CHANGELOG.md.
  9. Create a PR with the changes, submit, and merge once all requirements have been satisfied.
  10. Create a module version tag. git tag sdk/<module>/<version> where <module> is the module's path under the sdk directory and <version> is the version number determined earlier. Once the tag is created the module is released.
  11. Visit https://godoc.org/github.com/Azure/azure-sdk-for-go/sdk/<module> to generate/update documentation on godoc.org.