Makefile 754 Bytes
VERSION = 7.5
TARBALL = gitlab-deps-$(VERSION).tar.gz
PREFIX = /usr
WGET = wget
GITLAB_BRANCH = 7-5-stable
BUNDLE_OPTS = --verbose --without='development test'

all:
	bundle install $(BUNDLE_OPTS) --local --deployment

dist: $(TARBALL)

$(TARBALL):
	(git archive --prefix=gitlab-deps-$(VERSION)/ HEAD | gzip > $@) || ($(RM) $@; false)

install: all
	mkdir -p						$(DESTDIR)$(PREFIX)/lib/gitlab/vendor
	cp -r .bundle				$(DESTDIR)$(PREFIX)/lib/gitlab/.bundle
	cp -r vendor/bundle $(DESTDIR)$(PREFIX)/lib/gitlab/vendor/bundle

update: clean
	$(WGET) -O Gemfile https://gitlab.com/gitlab-org/gitlab-ce/raw/$(GITLAB_BRANCH)/Gemfile
	$(RM) Gemfile.lock
	bundle install $(BUNDLE_OPTS) --path vendor/bundle

clean:
	$(RM) -r .bundle/ vendor/bundle/ $(TARBALL)