-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.sh
More file actions
executable file
·52 lines (42 loc) · 1.8 KB
/
models.sh
File metadata and controls
executable file
·52 lines (42 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/sh
. ./release_config.sh
. ./release_util.sh
. ./config.sh
rm -rf models
git clone "${MODELS_REPO}"
git submodule update --init
cd models
git checkout -b master --track origin/master
if ! git flow init -f -d; then exit; fi
if ! git flow release start $MODELS_RELEASE; then exit; fi
if ! git submodule update --init; then exit; fi
(cd data; git checkout master; git pull origin master)
git add data
git commit -m 'Updated submodule to the latest release.'
virtualenv venv
. ./venv/bin/activate
pip install -r tests/requirements.txt
sed -itmp -e "s/MODEL_GENERATOR_VERSION=.*/MODEL_GENERATOR_VERSION=$MODEL_GENERATOR_RELEASE/" tests/data/raw/Makefile
sed -itmp -e "s/MINCER_VERSION=.*/MINCER_VERSION=$MINCER_RELEASE/" tests/data/raw/Makefile
git add tests/data/raw/Makefile
git commit -m 'Updated test dependencies to release versions.'
if ! make test-data; then exit; fi
if ! make data.mch solver7_tests tests; then exit; fi
git add tests/data/raw
git commit -m 'Regenerated test data files.'
if ! bumpversion --verbose --new-version="${MODELS_RELEASE}" release; then exit; fi
if ! git flow release finish; then exit; fi
sed -itmp -e "s/MODEL_GENERATOR_VERSION=.*/MODEL_GENERATOR_VERSION=$MODEL_GENERATOR_SNAPSHOT/" tests/data/raw/Makefile
sed -itmp -e "s/MINCER_VERSION=.*/MINCER_VERSION=$MINCER_SNAPSHOT/" tests/data/raw/Makefile
git add tests/data/raw/Makefile
git commit -m 'Updated test dependencies to SNAPSHOT versions.'
if ! make test-data; then exit; fi
git add tests/data/raw/Makefile
git commit -m 'Updated test dependencies to development versions.'
git add tests/data/raw
git commit -m 'Regenerated test files'
(cd data; git checkout develop; git pull)
git add data
git commit -m 'Updated submodule to the latest development version.'
if ! bumpversion --verbose minor; then exit; fi
push_confirmation "models"