Skip to content
This repository was archived by the owner on Nov 21, 2019. It is now read-only.

Conversation

@thewilkybarkid
Copy link
Contributor

Assumes tags are like v1.0.0 and branches 1.0.

@thewilkybarkid
Copy link
Contributor Author

@thewilkybarkid
Copy link
Contributor Author

thewilkybarkid commented Sep 12, 2018

The main purpose of this was to stop duplicate builds (ie both the branch and PR).

Thinking about it, we probably want to promote using forks, but if we do need local branches they should be like, say, feature/foo or bug/bar. In that case it'd be better to except anything containing a /?

@stephenwf
Copy link

Hmm, you can get some better control using conditions in Travis. It's not clear from the doc, but I believe it a top level if:

if: tag IS present OR \
    type = pull_request OR \
    branch = master

You can also add these if: blocks to stages

@thewilkybarkid
Copy link
Contributor Author

Ah, interesting. Still need to check if the branch name is master or version-like (eg 1.0; or not prefixed).

@thewilkybarkid thewilkybarkid added this to the 0.1.0 milestone Sep 13, 2018
@thewilkybarkid
Copy link
Contributor Author

To add bit more context, want to tag v0.1.0 and create a 0.1 branch (master then being 0.2). Means can release a v0.1.1 before v0.2.0 if needed.

- master
if: |
branch = master OR \
branch =~ /^(?:[0-9]|[1-9][0-9]*)\.(?:[0-9]|[1-9][0-9]*)$/ OR \

Choose a reason for hiding this comment

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

Version branches are probably a necessary evil for minor versions for releasing open source packages. The more complex this is the more we should start to extract it from the single repository into a template.

@thewilkybarkid thewilkybarkid merged commit 0e12fde into libero:master Sep 13, 2018
@thewilkybarkid thewilkybarkid deleted the travis-tags branch September 13, 2018 12:28
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.

3 participants