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

feat: tool for comparing different ignite versions #3718

Merged
merged 112 commits into from
Apr 19, 2024
Merged

Conversation

Ehsan-saradar
Copy link
Contributor

@Ehsan-saradar Ehsan-saradar commented Oct 30, 2023

close #3699

Description

This PR implements a tool to scaffold two chains for different versions, compare them, and generate a concise version diff into a document file. This tool automates the comparison process by scaffolding a chain for each version and analyzing the differences to produce an informative report. After creating a new migration doc into the docs/docs/06-migration migration folder with the name of the version (eg: v28.2.0.md)

go run main.go -f v28.0.0 -t v28.2.0

Sample of output (renamed to .TXT only for I can share here):
v28.2.0.md.TXT

CO-AUTHOR: @Pantani

@github-actions github-actions bot added component:ci CI/CD workflow and automated jobs. component:configs labels Oct 30, 2023
go.mod Outdated Show resolved Hide resolved
@Pantani Pantani requested a review from julienrbrt April 6, 2024 02:47
@Pantani Pantani requested a review from julienrbrt April 8, 2024 08:42
julienrbrt
julienrbrt previously approved these changes Apr 17, 2024
salmad3
salmad3 previously approved these changes Apr 18, 2024
@Pantani Pantani requested a review from salmad3 April 18, 2024 23:47
@Pantani Pantani merged commit 95e7a4b into main Apr 19, 2024
46 checks passed
@Pantani Pantani deleted the feat/auto-migdoc branch April 19, 2024 21:44
julienrbrt pushed a commit that referenced this pull request May 29, 2024
* Add gen-migdoc script

* Fix gen-migdoc script

* Add gen-mig-docs tool

* Add exceptions and more test cases to migdoc

* Add diff subtraction and cleanup

* Minor improvements

* Remove gen-migdoc bash script

* Move exception files to different file

* Change the diff subtraction algorithm

* Clean up error handling

* Add diff package

* Add Subtract to diff package

* Cleanup gen-mig-diffs

* Fix bugs

* Fix bugs

* Add more test to subtract test cases

* Update the subtract lines algorithm

* go mod tidy

* Add changelog

* Fix lint errors

* Fix bugs

* Fix lint

* make format

* Fix cleanup

* Update ignite/internal/tools/gen-mig-diffs/migdiff/gen.go

Co-authored-by: Danilo Pantani <[email protected]>

* Update ignite/internal/tools/gen-mig-diffs/migdiff/gen.go

Co-authored-by: Danilo Pantani <[email protected]>

* Fix lint

* Use cliui instead of log package

* add gen options

* code clean

* improve error log

* reset and clean the repo before the checkout to avoid conflicts

* use https for repo url

* draft refactor

* improve the logs

* remove useless code

* add pkg options

* pass the context to the commands

* add cache file

* create Scaffold struct

* fix wrong output

* add the scaffold cache

* fix folder search for diffs

* improve the logs and comments

* remove unused temp folder creation

* fix binaries path

* generate migration docs inside a doc template

* format the markdown file

* unhandled error

* fix changelog

* markdown breakline

* add CI to generate migration docs for each release

* skip diff if is empty

* use script to gen mig file

* fix link for the genesis file

---------

Co-authored-by: Danilo Pantani <[email protected]>
Co-authored-by: Danny <[email protected]>
Co-authored-by: Pantani <Pantani>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: automatically generate the migrations guide
5 participants