Generate cartodb.control with Makefile-driver version

Set version to 0.1dev
This commit is contained in:
Sandro Santilli 2014-05-08 09:58:58 +02:00
parent 0051ff33b3
commit b8e15dba83
4 changed files with 16 additions and 8 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
cartodb--*.sql
cartodb.control
results/
regression.*
expected/test

View File

@ -1,14 +1,17 @@
# cartodb/Makefile
EXTENSION = cartodb
EXTVERSION = 0.1
EXTVERSION = 0.1dev
CDBSCRIPTS = \
scripts-enabled/*.sql \
$(END)
DATA_built = $(EXTENSION)--$(EXTVERSION).sql \
$(EXTENSION)--unpackaged--$(EXTVERSION).sql
DATA_built = \
$(EXTENSION)--$(EXTVERSION).sql \
$(EXTENSION)--unpackaged--$(EXTVERSION).sql \
$(EXTENSION).control
DOCS = README.md
REGRESS_NEW = test_ddl_triggers
REGRESS_OLD = $(wildcard test/*.sql)
@ -27,8 +30,11 @@ $(EXTENSION)--$(EXTVERSION).sql: $(CDBSCRIPTS) cartodb_hooks.sql Makefile
echo "GRANT USAGE ON SCHEMA cartodb TO public;" >> $@
cat cartodb_hooks.sql >> $@
$(EXTENSION)--unpackaged--0.1.sql: $(EXTENSION)--$(EXTVERSION).sql util/create_from_unpackaged.sh Makefile
./util/create_from_unpackaged.sh cartodb--unpackaged--0.1.sql
$(EXTENSION)--unpackaged--$(EXTVERSION).sql: $(EXTENSION)--$(EXTVERSION).sql util/create_from_unpackaged.sh Makefile
./util/create_from_unpackaged.sh $(EXTVERSION)
$(EXTENSION).control: $(EXTENSION).control.in
sed -e 's/@@VERSION@@/$(EXTVERSION)/' $< > $@
legacy_regress: $(REGRESS_OLD) Makefile
mkdir -p sql/test/

View File

@ -1,4 +1,4 @@
default_version = '0.1'
default_version = '@@VERSION@@'
comment = 'Turn a database into a cartodb user database.'
superuser = true
relocatable = false

View File

@ -1,7 +1,8 @@
#!/bin/sh
input=cartodb--0.1.sql
output=cartodb--unpackaged--0.1.sql
ver=$1
input=cartodb--${ver}.sql
output=cartodb--unpackaged--${ver}.sql
cat ${input} > ${output}