-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
number571
committed
Oct 13, 2024
1 parent
4d210d4
commit b27339a
Showing
16 changed files
with
5,924 additions
and
3,260 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# CHANGELOG | ||
|
||
<!-- ... --> | ||
|
||
## v1.6.22~ | ||
|
||
*??? ??, ????* | ||
|
||
<!-- ... --> | ||
|
||
## v1.6.21 | ||
|
||
*October 13, 2024* | ||
|
||
### INIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package hiddenlake | ||
|
||
const ( | ||
CVersion = "v1.6.22~" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package hiddenlake | ||
|
||
import ( | ||
"bytes" | ||
_ "embed" | ||
"regexp" | ||
"strings" | ||
"testing" | ||
) | ||
|
||
var ( | ||
//go:embed CHANGELOG.md | ||
tgBinaryCHANGELOG []byte | ||
) | ||
|
||
func TestGoPeerVersion(t *testing.T) { | ||
t.Parallel() | ||
|
||
re := regexp.MustCompile(`##\s+(v\d+\.\d+\.\d+~?)\s+`) | ||
match := re.FindAllStringSubmatch(string(tgBinaryCHANGELOG), -1) | ||
if len(match) < 2 { | ||
t.Error("versions not found") | ||
return | ||
} | ||
|
||
if strings.HasSuffix(CVersion, "~") { | ||
if match[0][1] != CVersion { | ||
t.Error("the versions do not match") | ||
return | ||
} | ||
} else { | ||
// current version is always previous version in the changelog | ||
if match[1][1] != CVersion { | ||
t.Error("the versions do not match") | ||
return | ||
} | ||
} | ||
|
||
if match[0][1] == match[1][1] { | ||
t.Error("the same versions inline") | ||
return | ||
} | ||
|
||
for i := 0; i < len(match); i++ { | ||
for j := i + 1; j < len(match)-1; j++ { | ||
if match[i][1] == match[j][1] { | ||
t.Errorf("found the same versions (i=%d, j=%d)", i, j) | ||
return | ||
} | ||
} | ||
} | ||
|
||
if bytes.Count(tgBinaryCHANGELOG, []byte("*??? ??, ????*")) != 1 { | ||
t.Error("is there no new version or more than one new version?") | ||
return | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.