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: config file schema versioning #121

Closed
wants to merge 1 commit into from

Conversation

zaremba-tomasz
Copy link
Contributor

@zaremba-tomasz zaremba-tomasz commented Oct 2, 2023

This PR adds a config file schema versioning mechanism. The schema version is kept in the versions.json file and will be manually updated and needed. Each command of the CLI which works with .initium.yaml file should compare the version within the file with the one embedded in the binary and decide whether it can proceed or not.

Closes #116.

src/cli/init.go Outdated Show resolved Hide resolved
@zaremba-tomasz zaremba-tomasz force-pushed the feat/config-file-schema-versioning branch 4 times, most recently from 1d9d69e to b4d40c4 Compare October 3, 2023 10:00
@zaremba-tomasz zaremba-tomasz force-pushed the feat/config-file-schema-versioning branch from b4d40c4 to bde6928 Compare October 3, 2023 10:01
@zaremba-tomasz zaremba-tomasz marked this pull request as ready for review October 3, 2023 10:09
Comment on lines +1 to +4
{
"cliVersion": "v0.5.0",
"configFileSchemaVersion": "v1"
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zaremba-tomasz just getting back to this, what's the reason to keep this in a json file and not in code?

@zaremba-tomasz
Copy link
Contributor Author

Implementation has to be rewritten from the scratch, more details in the task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement a check command to verify that the config file validity
2 participants