Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile: add a target to run tests #295

Merged
merged 2 commits into from
Jan 20, 2016
Merged

Conversation

vbatts
Copy link
Member

@vbatts vbatts commented Jan 7, 2016

For now, just vet and lint. But would like to include the commit
validator, once a good range is selectable.

Signed-off-by: Vincent Batts vbatts@hashbangbash.com

@wking
Copy link
Contributor

wking commented Jan 8, 2016

On Thu, Jan 07, 2016 at 12:33:19PM -0800, Vincent Batts wrote:

But would like to include the commit validator, once a good range is
selectable.

With reliable Git configs, I'd replace ${TRAVIS_COMMIT_RANGE} with:

@{upstream}..HEAD

although for me, @{upstream} is usually my downstream GitHub
repository (because I use ‘hub pull-request’ 1). Git lets you
distinguish between push and pull repositories (branch..remote
and branch..pushremote), but does not seem to allow that
distinction for branches (as of 2.7.0).

Alternatively, we could assume that all branches are being developed
for opencontainers/specs' master, so:

REMOTE = $(shell git remote -v | sed -n 's|^([^[:space:]]_)[[:space:]]._github.com/opencontainers/specs.*|\1|p' | head -n1)

.gitvalidation:
git-validation -run DCO,short-subject -v -range $(REMOTE)/master..HEAD

I'm not sure which is more reliable:

a. @{upstream} actually pointing at the upstream branch, or
b. ‘master’ being the right upstream branch and
i. branch..remote actually having the upstream remote name, or
ii. sed'ing through ‘git remote -v’ to find the right remote name

Alternatively, you could just require folks to set UPSTREAM
explicitly, and guess it's ‘@{upstream}’ or origin/master, or
whatever:

UPSTREAM = @{upstream}

.gitvalidation:
git-validation -run DCO,short-subject -v -range $(UPSTREAM)..HEAD

See #216 for why I prefer two dots to three.

@crosbymichael
Copy link
Member

LGTM

For now, just vet and lint. But would like to include the commit
validator, once a good range is selectable.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
@vishh
Copy link
Contributor

vishh commented Jan 13, 2016

LGTM

Since we can't go from the first commit, choosing an arbitrary epoch commit

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
@philips
Copy link
Contributor

philips commented Jan 20, 2016

LGTM

vbatts added a commit that referenced this pull request Jan 20, 2016
Makefile: add a target to run tests
@vbatts vbatts merged commit c8de60b into opencontainers:master Jan 20, 2016
@vbatts vbatts deleted the vbatts-test branch January 20, 2016 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants