-
Notifications
You must be signed in to change notification settings - Fork 224
*: switch to dep for dependency management #876
Conversation
@@ -0,0 +1,15 @@ | |||
#!/bin/bash -e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you notice anything that fails this check so far? Or is this an assert style sanity check?
This also doesn't seem to assert that the assets in the vendor/ are valid corresponding to either the toml/lock. Is that worth doing as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assert style sanity check.
scripts/verify-gopkg.sh
Outdated
|
||
# NOTE(ericchiang): For some reason you need this "export" here for bash reasons | ||
# I don't understand. | ||
export DIFF=$( diff <(echo "$TOML") <(echo "$LOCK") ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given you comment, and a quick test, did you ensure this works in the failure case?
You don't wrap the value in quotes, and DIFF=
and export DIFF=
work differently if the values have spaces, at least in my quick little experiment it seemed to.
It seems like maybe export
is papering over the fact that your value has whitespace and allowing for false positives?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might need a -q
in there as well to only print when files differ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I confirmed that this works when the files are out of sync.
If I comment out the export
and modify one of the Gopkg files I can replicate locally that DIFF
becomes set to the empty string no matter what.
I can add some quotes, though I tested that and it didn't work to fix this problem. @thorfour and I were staring at this for a while and don't have any good answer here.
scripts/verify-gopkg.sh
Outdated
|
||
# NOTE(ericchiang): For some reason you need this "export" here for bash reasons | ||
# I don't understand. | ||
export DIFF=$( diff <(echo "$TOML") <(echo "$LOCK") ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be:
DIFF=$( diff <(echo "$TOML") <(echo "$LOCK") || true )
diff
will return an error code if there is a difference causing the script to exit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it worked!
Gonna wait for #877 to merge to push the change. |
merged #877 |
No description provided.