mirror of
https://github.com/dimitri/pgloader.git
synced 2025-08-10 00:07: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
|
QLDIR = $(BUILDDIR)/quicklisp
|
||||||
MANIFEST = $(BUILDDIR)/manifest.ql
|
MANIFEST = $(BUILDDIR)/manifest.ql
|
||||||
LATEST = $(BUILDDIR)/pgloader-latest.tgz
|
LATEST = $(BUILDDIR)/pgloader-latest.tgz
|
||||||
|
|
||||||
|
BUNDLEDIST = 2017-04-03
|
||||||
BUNDLENAME = pgloader-bundle-$(VERSION)
|
BUNDLENAME = pgloader-bundle-$(VERSION)
|
||||||
BUNDLEDIR = $(BUILDDIR)/bundle/$(BUNDLENAME)
|
BUNDLEDIR = $(BUILDDIR)/bundle/$(BUNDLENAME)
|
||||||
BUNDLE = $(BUILDDIR)/$(BUNDLENAME).tgz
|
BUNDLE = $(BUILDDIR)/$(BUNDLENAME).tgz
|
||||||
|
BUNDLETESTD= $(BUILDDIR)/bundle/test
|
||||||
|
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
EXE = .exe
|
EXE = .exe
|
||||||
@ -164,12 +167,16 @@ test: $(PGLOADER)
|
|||||||
|
|
||||||
clean-bundle:
|
clean-bundle:
|
||||||
rm -rf $(BUNDLEDIR)
|
rm -rf $(BUNDLEDIR)
|
||||||
|
rm -rf $(BUNDLETESTD)/$(BUNDLENAME)/*
|
||||||
|
|
||||||
|
$(BUNDLETESTD):
|
||||||
|
mkdir -p $@
|
||||||
|
|
||||||
$(BUNDLEDIR):
|
$(BUNDLEDIR):
|
||||||
mkdir -p $@
|
mkdir -p $@
|
||||||
$(CL) $(CL_OPTS) --load $(QLDIR)/setup.lisp \
|
$(CL) $(CL_OPTS) --load $(QLDIR)/setup.lisp \
|
||||||
--eval '(defvar *bundle-dir* "$@")' \
|
--eval '(defvar *bundle-dir* "$@")' \
|
||||||
--eval '(defvar *ql-dist* "2017-04-03")' \
|
--eval '(defvar *ql-dist* "$(BUNDLEDIST)")' \
|
||||||
--load bundle/ql.lisp
|
--load bundle/ql.lisp
|
||||||
|
|
||||||
$(BUNDLE): $(BUNDLEDIR)
|
$(BUNDLE): $(BUNDLEDIR)
|
||||||
@ -181,9 +188,12 @@ $(BUNDLE): $(BUNDLEDIR)
|
|||||||
tar -C build/bundle \
|
tar -C build/bundle \
|
||||||
--exclude bin \
|
--exclude bin \
|
||||||
--exclude test/sqlite \
|
--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:
|
test-bundle:
|
||||||
$(MAKE) -C $(BUNDLEDIR) test
|
$(MAKE) -C $(BUNDLEDIR) test
|
||||||
@ -231,4 +241,4 @@ latest:
|
|||||||
|
|
||||||
check: test ;
|
check: test ;
|
||||||
|
|
||||||
.PHONY: test pgloader-standalone docs
|
.PHONY: test pgloader-standalone docs bundle
|
||||||
|
@ -12,9 +12,11 @@
|
|||||||
(defvar *ql-dist-url-format*
|
(defvar *ql-dist-url-format*
|
||||||
"http://beta.quicklisp.org/dist/quicklisp/~a/distinfo.txt")
|
"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
|
(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
|
(first
|
||||||
(ql-dist:available-versions (ql-dist:dist "quicklisp"))))
|
(ql-dist:available-versions (ql-dist:dist "quicklisp"))))
|
||||||
(format nil *ql-dist-url-format* *ql-dist*))))
|
(format nil *ql-dist-url-format* *ql-dist*))))
|
||||||
|
Loading…
Reference in New Issue
Block a user