mirror of
https://github.com/dimitri/pgloader.git
synced 2025-08-07 06:47:00 +02:00
Improve bundle building.
Now when building a bundle file for source distribution of pgloader, always test it by building a binary image from the bundle tarball in a test directory. Also make it easy to target "latest" Quicklisp distribution with the following spelling: make BUNDLEDIST=latest bundle
This commit is contained in:
parent
72431d4708
commit
38a6b4968d
18
Makefile
18
Makefile
@ -21,9 +21,12 @@ LIBS = $(BUILDDIR)/libs.stamp
|
||||
QLDIR = $(BUILDDIR)/quicklisp
|
||||
MANIFEST = $(BUILDDIR)/manifest.ql
|
||||
LATEST = $(BUILDDIR)/pgloader-latest.tgz
|
||||
|
||||
BUNDLEDIST = 2017-04-03
|
||||
BUNDLENAME = pgloader-bundle-$(VERSION)
|
||||
BUNDLEDIR = $(BUILDDIR)/bundle/$(BUNDLENAME)
|
||||
BUNDLE = $(BUILDDIR)/$(BUNDLENAME).tgz
|
||||
BUNDLETESTD= $(BUILDDIR)/bundle/test
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
EXE = .exe
|
||||
@ -164,12 +167,16 @@ test: $(PGLOADER)
|
||||
|
||||
clean-bundle:
|
||||
rm -rf $(BUNDLEDIR)
|
||||
rm -rf $(BUNDLETESTD)/$(BUNDLENAME)/*
|
||||
|
||||
$(BUNDLETESTD):
|
||||
mkdir -p $@
|
||||
|
||||
$(BUNDLEDIR):
|
||||
mkdir -p $@
|
||||
$(CL) $(CL_OPTS) --load $(QLDIR)/setup.lisp \
|
||||
--eval '(defvar *bundle-dir* "$@")' \
|
||||
--eval '(defvar *ql-dist* "2017-04-03")' \
|
||||
--eval '(defvar *ql-dist* "$(BUNDLEDIST)")' \
|
||||
--load bundle/ql.lisp
|
||||
|
||||
$(BUNDLE): $(BUNDLEDIR)
|
||||
@ -181,9 +188,12 @@ $(BUNDLE): $(BUNDLEDIR)
|
||||
tar -C build/bundle \
|
||||
--exclude bin \
|
||||
--exclude test/sqlite \
|
||||
-czf $@ pgloader-bundle-$(VERSION)
|
||||
-czf $@ $(BUNDLENAME)
|
||||
|
||||
bundle: $(BUNDLE)
|
||||
bundle: clean-bundle $(BUNDLE) $(BUNDLETESTD)
|
||||
tar -C $(BUNDLETESTD) -xf $(BUNDLE)
|
||||
make -C $(BUNDLETESTD)/$(BUNDLENAME)
|
||||
$(BUNDLETESTD)/$(BUNDLENAME)/bin/pgloader --version
|
||||
|
||||
test-bundle:
|
||||
$(MAKE) -C $(BUNDLEDIR) test
|
||||
@ -231,4 +241,4 @@ latest:
|
||||
|
||||
check: test ;
|
||||
|
||||
.PHONY: test pgloader-standalone docs
|
||||
.PHONY: test pgloader-standalone docs bundle
|
||||
|
@ -12,9 +12,11 @@
|
||||
(defvar *ql-dist-url-format*
|
||||
"http://beta.quicklisp.org/dist/quicklisp/~a/distinfo.txt")
|
||||
|
||||
(let ((dist (if (eq :latest *ql-dist*)
|
||||
(let ((dist (if (or (eq :latest *ql-dist*)
|
||||
(string= "latest" *ql-dist*))
|
||||
(cdr
|
||||
;; available-versions is an alist of (date . url)
|
||||
;; available-versions is an alist of (date . url), and the
|
||||
;; first one is the most recent one
|
||||
(first
|
||||
(ql-dist:available-versions (ql-dist:dist "quicklisp"))))
|
||||
(format nil *ql-dist-url-format* *ql-dist*))))
|
||||
|
Loading…
Reference in New Issue
Block a user