Skip to content

Commit 78b5af9

Browse files
hmmrAndrei Zavada
authored andcommitted
avoid copying .git dirs when preparing rel- targets
Specifically, those in eleveldb submodules # Conflicts: # Makefile
1 parent 46edb0c commit 78b5af9

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

Makefile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,20 +74,21 @@ test : testclean eunit test-deps
7474
## Release targets
7575
##
7676
rel: compile
77-
$(REBAR) as rel release
78-
cp -a _build/rel/rel/riak rel/
77+
@$(REBAR) as rel release
78+
# freebsd tar won't write to stdout, so
79+
@tar -c -f rel.tar --exclude '*/.git/*' -C _build/rel/rel riak && tar -x -f rel.tar -C rel && rm rel.tar
7980

8081
rel-rpm: compile
81-
$(REBAR) as rpm release
82-
cp -a _build/rpm/rel/riak rel/
82+
@$(REBAR) as rpm release
83+
@tar --exclude='*/.git/*' -c -C _build/rpm/rel riak | tar -x -C rel
8384

8485
rel-deb: compile
85-
$(REBAR) as deb release
86-
cp -a _build/deb/rel/riak rel/
86+
@$(REBAR) as deb release
87+
@tar --exclude='*/.git/*' -c -C _build/deb/rel riak | tar -x -C rel
8788

8889
relclean:
89-
rm -rf $(REL_DIR)
90-
rm -rf rel/riak
90+
@rm -rf $(REL_DIR)
91+
@rm -rf rel/riak rel/.libs rel/.deps
9192

9293
##
9394
## Developer targets

rel/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.deps/
2+
.libs/

0 commit comments

Comments
 (0)