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

Included src-d/ci/Makefile.main in Makefile #76

Merged
merged 3 commits into from
Jul 18, 2017

Conversation

mcarmonaa
Copy link
Contributor

#74

@codecov
Copy link

codecov bot commented Jul 11, 2017

Codecov Report

Merging #76 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #76   +/-   ##
=======================================
  Coverage   85.03%   85.03%           
=======================================
  Files          16       16           
  Lines         942      942           
=======================================
  Hits          801      801           
  Misses         83       83           
  Partials       58       58

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 29f7bc7...8e0a26f. Read the comment docs.

@abeaumont abeaumont self-requested a review July 12, 2017 09:23
@abeaumont abeaumont self-assigned this Jul 12, 2017
.gitignore Outdated
@@ -1 +1,3 @@
.linguist
.ci
Makefile.main
Copy link
Contributor

Choose a reason for hiding this comment

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

minor: newline at EOF

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have it in my local:

➜  enry.v1 git:(fix/makefile-ci) ✗ hexdump -c .gitignore
0000000   .   l   i   n   g   u   i   s   t  \n   .   c   i  \n   M   a
0000010   k   e   f   i   l   e   .   m   a   i   n  \n                
000001c

but it seems that GH remove the new line

Copy link
Contributor

Choose a reason for hiding this comment

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

weird, it seems correct now

cli/enry/main.go Outdated
usage: %[1]s <path>
%[1]s [-json] [-breakdown] <path>
%[1]s [-json] [-breakdown]
usage: enry <path>
Copy link
Contributor

Choose a reason for hiding this comment

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

what's the reason for hardcoding the binary name now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No reason, let me change it to the no hardcoded version

Makefile Outdated
LOCAL_TAG := $(shell git describe --tags --abbrev=0)
LOCAL_COMMIT := $(shell git rev-parse --short HEAD)
LOCAL_BUILD := $(shell date +"%m-%d-%Y_%H_%M_%S")
LDFLAGS = -s -X main.version=$(LOCAL_TAG) -X main.build=$(LOCAL_BUILD) -X main.commit=$(LOCAL_COMMIT)
Copy link
Contributor

Choose a reason for hiding this comment

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

minor: it may be better to use += or ?= instead of =, since having a customizable LDFLAGS by the user may be desirable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe it's better just rename the variable to LOCAL_LDFLAGS because in the Makefile.main could be in the future a LDFLAGS to build the binaries for releases and it shouldn't be changed

what do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

sounds good


$(MAKEFILE):
@git clone --quiet $(CI_REPOSITORY) $(CI_FOLDER); \
cp $(CI_FOLDER)/$(MAKEFILE) .;
Copy link
Contributor

Choose a reason for hiding this comment

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

If you just need the Makefile.main file, it may be simpler and more efficient to just get it:

wget https://raw.githubusercontent.com/src-d/ci/master/Makefile.main

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's how the example does it https://github.com/src-d/ci/blob/master/examples/ci/Makefile

Should I change it anyway?

Copy link
Contributor

Choose a reason for hiding this comment

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

hmmm, I'd like to hear what @smola or @erizocosmico have to say then, since they'll know better.

Copy link
Contributor

Choose a reason for hiding this comment

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

It could be done with wget, Makefile.main has no other dependencies afaik. Check in with @mcuadros first though and if he approves then also make a PR in the examples.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is being handled here: src-d/ci#37

@abeaumont abeaumont requested a review from smola July 12, 2017 09:33
@abeaumont abeaumont requested a review from mcuadros July 12, 2017 12:09
@mcarmonaa
Copy link
Contributor Author

I opened a PR to discuss about using wget to download only Makefile.main

src-d/ci#37

@abeaumont abeaumont merged commit c885af7 into src-d:master Jul 18, 2017
@mcarmonaa mcarmonaa deleted the fix/makefile-ci branch October 11, 2017 14:56
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.

3 participants