Makefile
1.15 KB
VERSION = 7.5.3
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
grep -rl '/this/will/be/overwritten/or/wrapped/anyways/do/not/worry/ruby' vendor/bundle/ruby/gems/*/bin | xargs --no-run-if-empty sed -i -e '1 s|.*|#!/usr/bin/env ruby|'
dist: $(TARBALL)
$(TARBALL):
(git archive --prefix=gitlab-deps-$(VERSION)/ HEAD | gzip > $@) || ($(RM) $@; false)
install: all
mkdir -p $(DESTDIR)$(PREFIX)/lib/gitlab/vendor
install -m 0644 Gemfile $(DESTDIR)$(PREFIX)/lib/gitlab
install -m 0644 Gemfile.lock $(DESTDIR)$(PREFIX)/lib/gitlab
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
$(WGET) -O Gemfile.lock https://gitlab.com/gitlab-org/gitlab-ce/raw/$(GITLAB_BRANCH)/Gemfile.lock
bundle install $(BUNDLE_OPTS) --path vendor/bundle
clean:
$(RM) -r .bundle/ vendor/bundle/ $(TARBALL)