Skip to content

Commit

Permalink
final fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tkxkd0159 committed Mar 11, 2024
1 parent 6b62b63 commit c530a49
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 40 deletions.
33 changes: 11 additions & 22 deletions RELEASE_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

# Changelog

## [v3.0.0]
## [v3.0.0] - 2024-03-04

### Features
* (build) [\#329](https://github.com/Finschia/finschia/pull/329) rename namespace to v3
Expand All @@ -58,9 +58,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (ci) [\#305](https://github.com/Finschia/finschia/pull/305) add e2e-ibc ci
* (build) [\#316](https://github.com/Finschia/finschia/pull/316) change docker image version to fix build error

## [v2.0.0]

This version base on [finschia-sdk v0.48.0](https://github.com/Finschia/finschia-sdk/releases/tag/v0.48.0), [Ostracon v1.1.2](https://github.com/Finschia/ostracon/tree/v1.1.2), [finschia/wasmd v0.2.0](https://github.com/Finschia/wasmd/releases/tag/v0.2.0) and [finschia/ibc-go v4.3.1](https://github.com/Finschia/ibc-go/releases/tag/v4.3.1).
## [v2.0.0] - 2023-10-19

### Features
* (finschia-sdk) Bump github.com/Finschia/finschia-sdk from v0.47.0 to v0.48.0
Expand Down Expand Up @@ -105,9 +103,7 @@ This version base on [finschia-sdk v0.48.0](https://github.com/Finschia/finschia
* (docs) [\#281](https://github.com/Finschia/finschia/pull/281) Update guide for static build on CentOS


## [v1.0.0]

This version base on [finschia-sdk v0.47.0](https://github.com/Finschia/finschia-sdk/releases/tag/v0.47.0), [Ostracon v1.1.0](https://github.com/Finschia/ostracon/tree/v1.1.0), [finschia/wasmd v0.1.3](https://github.com/Finschia/wasmd/releases/tag/v0.1.3) and [finschia/ibc-go v3.3.3](https://github.com/Finschia/ibc-go/releases/tag/v3.3.3).
## [v1.0.0] - 2023-04-24

### Features
* (build) [\#126](https://github.com/Finschia/finschia/pull/126) Automatically generates release note and binaries
Expand Down Expand Up @@ -153,9 +149,7 @@ This version base on [finschia-sdk v0.47.0](https://github.com/Finschia/finschia
* (license) [\#170](https://github.com/Finschia/finschia/pull/170) fix license copyright holder and typo


## [v0.7.0]

This version base on [finschia-sdk v0.46.0](https://github.com/Finschia/finschia-sdk/releases/tag/v0.46.0).
## [v0.7.0] - 2022-11-29

### Features
* [\#108](https://github.com/Finschia/finschia/pull/108) Bump github.com/line/lbm-sdk from e19f863a8 to a389b6330
Expand All @@ -175,9 +169,7 @@ This version base on [finschia-sdk v0.46.0](https://github.com/Finschia/finschia
* (app) [\#114](https://github.com/Finschia/finschia/pull/114) change the default compile setting to support ledger


## [v0.6.0]

This version based on [finschia-sdk v0.46.0-rc8](https://github.com/Finschia/finschia-sdk/releases/tag/v0.46.0-rc8)
## [v0.6.0] - 2022-10-05

### Bug Fixes
* (app) [\#96](https://github.com/Finschia/finschia/pull/96) fix the bug not setting `iavl-cache-size` value of the `app.toml`
Expand All @@ -193,9 +185,7 @@ This version based on [finschia-sdk v0.46.0-rc8](https://github.com/Finschia/fin
* (build) [\#89](https://github.com/Finschia/finschia/pull/89) upgrade golang to 1.18


## [v0.5.0]

This version based on [finschia-sdk v0.46.0-rc6](https://github.com/Finschia/finschia-sdk/releases/tag/v0.46.0-rc6)
## [v0.5.0] - 2022-09-08

### Features
* (x/collection) [\#72](https://github.com/Finschia/finschia/pull/72) add x/collection
Expand All @@ -210,9 +200,7 @@ This version based on [finschia-sdk v0.46.0-rc6](https://github.com/Finschia/fin
* (x/collection) [\#90](https://github.com/Finschia/finschia/pull/90) fix bugs in x/collection MsgModify


## [v0.4.0]

This version based on finschia-sdk v0.46.0-rc2
## [v0.4.0] - 2022-06-13

### Features
* (cosmos-sdk) [\#56](https://github.com/Finschia/finschia/pull/56) bump up cosmos-sdk v0.45.1
Expand All @@ -224,7 +212,7 @@ This version based on finschia-sdk v0.46.0-rc2
* (app) [\#60](https://github.com/Finschia/finschia/pull/60) register authz module store key


## [v0.3.0]
## [v0.3.0] - 2022-03-31

### Bug Fixes
* (build) [\#47](https://github.com/Finschia/finschia/pull/47) fix Docker build error
Expand All @@ -234,7 +222,7 @@ This version based on finschia-sdk v0.46.0-rc2
* (x/upgrade) [\#42](https://github.com/Finschia/finschia/pull/42) add token module and bump cosmos-sdk v0.42.11


## [v0.2.0]
## [v0.2.0] - 2022-02-04

### Features
* (x/upgrade) [\#33](https://github.com/Finschia/finschia/pull/33) To smoothen the update to the latest stable release, the SDK includes version map for managing migrations between SDK versions.
Expand All @@ -244,7 +232,7 @@ This version based on finschia-sdk v0.46.0-rc2
### Improvements
* (slashing) [\#31] (https://github.com/Finschia/finschia/pull/31) Apply VoterSetCounter

## [v0.1.0]
## [v0.1.0] - 2021-11-01

### Features
* (app) Revise bech32 prefix cosmos to link and tlink
Expand Down Expand Up @@ -276,3 +264,4 @@ This version based on finschia-sdk v0.46.0-rc2
[v0.3.0]: https://github.com/Finschia/finschia/releases/tag/v0.3.0
[v0.2.0]: https://github.com/Finschia/finschia/releases/tag/v0.2.0
[v0.1.0]: https://github.com/Finschia/finschia/releases/tag/v0.1.0
[gaia v4.0.4]: https://github.com/cosmos/gaia/releases/tag/v4.0.4
41 changes: 39 additions & 2 deletions RELEASE_DESCR.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
<!--
Usage:
Include additional details about the release in this file, separate from the RELEASE_CHANGELOG.
Feel free to add any highlights or other information you'd like to share with the community.
-->

# DESCRIPTION OF RELEASE

## [vx.y.z]
## [vX.Y.Z] - YYYY-MM-DD
<!-- <Desription of This Release> -->
<!-- <Add Highlights or any sections if you need> -->
<!-- <Add Highlights or any sections if you need> -->

## [v3.0.0] - 2024-03-04
## Highlights
* patch [CWA-2023-004 issue](https://forum.cosmos.network/t/high-severity-security-patch-upcoming-on-wed-10th-cwa-2023-004-brought-to-you-by-certik-and-confio/12840)
* Ensure smart contracts compiled with Rust v1.70 run without errors.
* disable custom querier in wasm

## [v2.0.0] - 2023-10-19

## [v1.0.0] - 2023-04-24
This version base on [finschia-sdk v0.47.0](https://github.com/Finschia/finschia-sdk/releases/tag/v0.47.0), [Ostracon v1.1.0](https://github.com/Finschia/ostracon/tree/v1.1.0), [finschia/wasmd v0.1.3](https://github.com/Finschia/wasmd/releases/tag/v0.1.3) and [finschia/ibc-go v3.3.3](https://github.com/Finschia/ibc-go/releases/tag/v3.3.3).

## [v0.7.0] - 2022-11-29
This version base on [finschia-sdk v0.46.0](https://github.com/Finschia/finschia-sdk/releases/tag/v0.46.0).

## [v0.6.0] - 2022-10-05
This version based on [finschia-sdk v0.46.0-rc8](https://github.com/Finschia/finschia-sdk/releases/tag/v0.46.0-rc8)

## [v0.5.0] - 2022-09-08
This version based on [finschia-sdk v0.46.0-rc6](https://github.com/Finschia/finschia-sdk/releases/tag/v0.46.0-rc6)

## [v0.4.0] - 2022-06-13
This version based on finschia-sdk v0.46.0-rc2

## [v0.3.0] - 2022-03-31

## [v0.2.0] - 2022-02-04

## [v0.1.0] - 2021-11-01
This is the first release of the Finschia blockchain. It is based on [gaia v4.0.4].
35 changes: 19 additions & 16 deletions scripts/release-note.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


def get_prev_gittag(target_tag: str) -> str:

result = subprocess.run(
["git", "tag"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True
)
Expand Down Expand Up @@ -44,7 +43,7 @@ def extract_go_version(document: str):


with open("go.mod", "r") as file:
document = file.read()
gomod = file.read()

args = sys.argv[1:]
if len(args) != 1:
Expand All @@ -53,30 +52,36 @@ def extract_go_version(document: str):
# Generate release note
TAG = args[0]
PREV_TAG = get_prev_gittag(TAG)
GO_VERSION = extract_go_version(document)
OSTRACON_VERSION = extract_package_version(document, "github.com/Finschia/ostracon")
FNSASDK_VERSION = extract_package_version(document, "github.com/Finschia/finschia-sdk")
WASMD_VERSION = extract_package_version(document, "github.com/Finschia/wasmd")
IBC_VERSION = extract_package_version(document, "github.com/cosmos/ibc-go/v4")
GO_VERSION = extract_go_version(gomod)
OSTRACON_VERSION = extract_package_version(gomod, "github.com/Finschia/ostracon")
FNSASDK_VERSION = extract_package_version(gomod, "github.com/Finschia/finschia-sdk")
WASMD_VERSION = extract_package_version(gomod, "github.com/Finschia/wasmd")
IBC_VERSION = extract_package_version(gomod, "github.com/cosmos/ibc-go/v4")


def extract_release_contents(target: str, cur_tag: str, prev_tag: str) -> str:
with open(target, "r") as file:
document = file.read()
start_marker = f"## [{cur_tag}]"
start_pos = document.find(start_marker)
start_pos = document.find(start_marker) + len(start_marker) + len(" - YYYY-MM-DD")
if start_pos != -1:
if prev_tag == None or (
int(cur_tag[1:].split(".")[0]) != int(prev_tag[1:].split(".")[0])
):
content = document[start_pos + len(start_marker) :].strip()
if prev_tag is None:
end_pos = document.find("<!-- Release links -->")
if end_pos == -1:
match = re.search(r"## \[v\d+\.\d+\.\d+] - \d{4}-\d{2}-\d{2}", document[start_pos:])
if match is None:
end_pos = -1
else:
end_pos = start_pos + match.start() - 1
else:
end_marker = f"## [{prev_tag}]"
end_pos = document.find(end_marker)
content = document[start_pos + len(start_marker) : end_pos].strip()
if end_pos == -1:
match = re.search(r"## \[v\d+\.\d+\.\d+] - \d{4}-\d{2}-\d{2}", document[start_pos:])
end_pos = start_pos + match.start() - 1
else:
raise ValueError("Content not found between the specified markers.")
return content
return document[start_pos:end_pos].strip()


release_note = f"""# Finschia {TAG} Release Note
Expand All @@ -94,7 +99,6 @@ def extract_release_contents(target: str, cur_tag: str, prev_tag: str) -> str:
* Finschia/wasmd: [{WASMD_VERSION}](https://github.com/Finschia/wasmd/tree/{WASMD_VERSION})
* Finschia/ibc-go: [{IBC_VERSION}](https://github.com/Finschia/ibc-go/tree/{IBC_VERSION})
## Build from source
You must use Go {GO_VERSION} if building from source
```shell
Expand All @@ -115,6 +119,5 @@ def extract_release_contents(target: str, cur_tag: str, prev_tag: str) -> str:
Binaries for linux and darwin are available below.\n"""


with open("RELEASE_NOTE.md", "w") as file:
file.write(release_note)

0 comments on commit c530a49

Please sign in to comment.