Closed mpkorstanje closed 2 years ago
I think it makes sense to just disable this check for most of the tests, so I suggest making a DISABLE_CHECK_UP_TO_DATE env var which we set there instead, and unset it in the tests that specifically test that check.
I think you are fundamentally misunderstanding how the up to date check works. Could you give the code in check_up_to_date
a careful reading.
Keep in mind that POLYGLOT_RELEASE_VERSION
is only set when a release is made. So when released the script will always check GitHub. When not released, the script will not check GitHub. But we should always set POLYGLOT_RELEASE_GIT_REPO
during tests to ensure that we never check with GitHub, not even in case of a mistake.
Wrote https://github.com/cucumber/polyglot-release/issues/67 to address the problem of having polyglot-release
as a project specific implementation.
Due to time constraints I've merged this because I'd like to make a release of polyglot-release and start using it to release things. I think I've addressed the remaining problems sufficiently and/or put them on the backlog.
I think it makes sense to just disable this check for most of the tests, so I suggest making a DISABLE_CHECK_UP_TO_DATE env var which we set there instead, and unset it in the tests that specifically test that check.
I think you are fundamentally misunderstanding how the up to date check works. Could you give the code in
check_up_to_date
a careful reading.Keep in mind that
POLYGLOT_RELEASE_VERSION
is only set when a release is made. So when released the script will always check GitHub. When not released, the script will not check GitHub. But we should always setPOLYGLOT_RELEASE_GIT_REPO
during tests to ensure that we never check with GitHub, not even in case of a mistake.
OK I think I get it now - the POLYGLOT_RELEASE_GIT_REPO
variable only has a value for the commit that's released, then we change it back to empty in the post-release commit. So in general development use (development of polyglot-release, that is) it will have an empty value.
Correct?
You've confused POLYGLOT_RELEASE_GIT_REPO
for POLYGLOT_RELEASE_VERSION
but otherwise yes.
I'm easily confused!
🤔 What's changed?
polyglot-release
is on the latest version.Fixes: #55 Fixes: #64
⚡️ What's your motivation?
We're getting to the point where
polyglot-release
will not need many changes. This makes issues such as #64 easier to deal with by properly versioningpolyglot-release
.However making a release with an out of date version of
polyglot-release
may botch the release. For example, a newly added language may not be released. By checking ifpolyglot-release
is up to date we can avoid these problems.🏷️ What kind of change is this?
♻️ Anything particular you want feedback on?
The tests are a doozy.
📋 Checklist: