Skip to content
This repository has been archived by the owner before Nov 9, 2022. It is now read-only.

Use a case instead of if as pattern matching does not work with version of /bin/sh #68

Merged
merged 2 commits into from Apr 5, 2018

Conversation

Spedge
Copy link

@Spedge Spedge commented Apr 5, 2018

We have started using this git functionality due to problems with rebasing not triggering drone - but we are GitLab users and found that the if statements wouldn't work. I determined this was down to the version of /bin/sh packaged within alpine.

For more information on this, check out this SO post.
https://stackoverflow.com/a/19897118/31161

…of /bin/sh

Change from if to case as pattern matching doesn't work with version of /bin/sh
@Spedge
Copy link
Author

Spedge commented Apr 5, 2018

Not sure why Appveyor is included on this - seems to be failing for something not code-related

if [[ $DRONE_COMMIT_REF = "refs/merge-requests/"* ]]; then
REF="refs/merge-requests/${DRONE_PULL_REQUEST}/head"
fi
# case being used because pattern matching in /bin/sh needs case.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add this comment to both or don't add it at all

Copy link
Author

Choose a reason for hiding this comment

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

Fixed.

@tboerger
Copy link
Contributor

tboerger commented Apr 5, 2018

You can ignore the appveyor error because it's just missing the build config for the windows image.

@bradrydzewski bradrydzewski merged commit 77571c6 into drone-plugins:next Apr 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants