Skip to content

Commit

Permalink
fix: repo should not break-from-v6-to-v7
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos authored and jacobheun committed Aug 9, 2018
1 parent 9fc7b70 commit 33eab19
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ module.exports = (store) => {
log('comparing version: %s and %s', version, expected)

// Version 6 and 7 are the same
expected = expected === 6 ? expected = 7 : expected
// TODO: Clean up the compatibility logic. Repo feature detection would be ideal, or a better version schema
const compatibleVersion = (version === 6 && expected === 7) || (expected === 6 && version === 7)

if (version !== expected) {
if (version !== expected && !compatibleVersion) {
return callback(new Error(`version mismatch: expected v${expected}, found v${version}`))
}
callback()
Expand Down

0 comments on commit 33eab19

Please sign in to comment.