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

Proposal: .iamy-version file #62

Open
mipearson opened this issue Apr 10, 2019 · 0 comments
Open

Proposal: .iamy-version file #62

mipearson opened this issue Apr 10, 2019 · 0 comments

Comments

@mipearson
Copy link

We've had a few issues where people have gotten stuck/confused because the version of iamy they're running is newer/older than the version last used in that repository.

I'd like to add an .iamy-version file to be written to working directory that is in part inspired by Ruby bundler's version checking.

Behaviour:

  • if it doesn't exist, it's created as .iamy-version with the current output of iamy --version and an INFO message is printed
  • if it does exist and your version is newer than what's in .iamy-version, the file is overwritten and an INFO message is printed
  • if it does exist and your version is the same, nothing happens
  • if it does exist and your version is older by minor or patch version, a WARN message is printed
  • if it does exist and your version is older by major version, an ERROR message is printed and execution stops
jacobbednarz added a commit to jacobbednarz/iamy that referenced this issue Apr 29, 2019
With any project, eventually you get to a stage where you have
configuration defined that works on a specific version of your software.
Upgrading between versions usually requires some effort but it's rolled
out when it's needed. This becomes even more difficult working in a team
where people can have different versions of the software that you use
based on how often they like to update their systems.

To handle these scenarios, you introduce some sort of versioning that
defines what versions you want the configuration to operate with and the
users then need to meet those requirements.

This introduces a basic concept of the versioning for IAMy. The logic is
pretty straight forward.

- If you find a `.iamy-version` file, use the version defined in it. If
  not, continue on.
- If the `.iamy-version` file contains a version number, compare it to
  the local version and ensure that the version in use meets the minimum
  requirements to operate. If it doesn't, inform the user of the
  discrepancy and what is required.

99designs#62 proposes quite a few more coditions to restrain the version however
I don't think that's required for majority of use cases. I think
defining a minimum version covers most of the sharp edges we've
encountered. But, we can always make this more perscriptive if needed.

Closes 99designs#62
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 a pull request may close this issue.

1 participant