Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go: do not change module name #89

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Changelog

## [Unreleased]
### Fixed
- Go: Do not change version in go module ([#88](https://github.com/cucumber/polyglot-release/pull/88))

## [1.3.0] - 2022-12-02
### Fixed
- Go: Only use major version in go module ([#86](https://github.com/cucumber/polyglot-release/pull/86))
- Go: Only use major version in go module ([#86](https://github.com/cucumber/polyglot-release/pull/86))

## [1.2.0] - 2022-11-09
### Added
15 changes: 4 additions & 11 deletions polyglot-release
Original file line number Diff line number Diff line change
@@ -103,19 +103,12 @@ function is_monoglot_go() {
[[ -f go.mod ]]
}
function pre_release_go() {
check_for_tools "go" "jq" "sed"
# noop
:
}
function release_go() {
local new_major_version
new_major_version="$(echo "$NEW_VERSION" | sed -E 's/^([0-9]+)\.[0-9]+\.[0-9]+$/\1/')"
# The sed below also captures 3-digit versions
local module_with_new_version
module_with_new_version=$(
go mod edit -json |
jq -r '.Module.Path' |
sed -E "s/(.*)v[0-9]+(\.[0-9]+\.[0-9]+)?$/\1v$new_major_version/"
)
go mod edit -module "$module_with_new_version"
# noop
:
}
function post_release_go() {
# noop
2 changes: 1 addition & 1 deletion polyglot-release-test
Original file line number Diff line number Diff line change
@@ -62,7 +62,7 @@ function get_fixture() {
else
fixture=polyglot
fi
echo $fixture
echo "$fixture"
}

function setup_workdir() {
18 changes: 0 additions & 18 deletions tests/fixtures/go-three-digit-version/CHANGELOG.md

This file was deleted.

3 changes: 0 additions & 3 deletions tests/fixtures/go-three-digit-version/go.mod

This file was deleted.

2 changes: 0 additions & 2 deletions tests/only-release-go-three-digit-version.sh

This file was deleted.

25 changes: 0 additions & 25 deletions tests/only-release-go-three-digit-version.sh.expected.git-commits

This file was deleted.

6 changes: 0 additions & 6 deletions tests/only-release-go.sh.expected.git-commits
Original file line number Diff line number Diff line change
@@ -17,9 +17,3 @@ diff --git a/CHANGELOG.md b/CHANGELOG.md
-[Unreleased]: https://github.com/cucumber/polyglot-release/compare/v0.0.1...main
+[Unreleased]: https://github.com/cucumber/polyglot-release/compare/v1.0.0...main
+[1.0.0]: https://github.com/cucumber/polyglot-release/compare/v0.0.1...main
diff --git a/go.mod b/go.mod
--- a/go.mod
+++ b/go.mod
@@ -1 +1 @@
-module github.com/example/project/v0
+module github.com/example/project/v1