forked from openstack/devstack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
100 lines (79 loc) · 2.43 KB
/
Makefile
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# DevStack Makefile of Sanity
# Interesting targets:
# ds-remote - Create a Git remote for use by ds-push and ds-pull targets
# DS_REMOTE_URL must be set on the command line
#
# ds-push - Merge a list of branches taken from .ds-test and push them
# to the ds-remote repo in ds-test branch
#
# ds-pull - Pull the remote ds-test branch into a fresh local branch
#
# refresh - Performs a sequence of unstack, refresh and stack
# Duplicated from stackrc for now
DEST=/opt/stack
all:
@echo "This just saved you from a terrible mistake!"
# Do Some Work
stack:
./stack.sh
unstack:
./unstack.sh
docs:
tox -edocs
# Just run the shocco source formatting build
docs-build:
INSTALL_SHOCCO=True tools/build_docs.sh
# Just run the Sphinx docs build
docs-rst:
python setup.py build_sphinx
# Run the bashate test
bashate:
tox -ebashate
# Run the function tests
test:
tests/test_ini_config.sh
tests/test_meta_config.sh
tests/test_ip.sh
tests/test_refs.sh
# Spiff up the place a bit
clean:
./clean.sh
rm -rf accrc doc/build test*-e *.egg-info
# Clean out the cache too
realclean: clean
rm -rf files/cirros*.tar.gz files/Fedora*.qcow2
# Repo stuffs
pull:
git pull
# These repo targets are used to maintain a branch in a remote repo that
# consists of one or more local branches merged and pushed to the remote.
# This is most useful for iterative testing on multiple or remote servers
# while keeping the working repo local.
#
# It requires:
# * a remote pointing to a remote repo, often GitHub is used for this
# * a branch name to be used on the remote
# * a local file containing the list of local branches to be merged into
# the remote branch
GIT_REMOTE_NAME=ds-test
GIT_REMOTE_BRANCH=ds-test
# Push the current branch to a remote named ds-test
ds-push:
git checkout master
git branch -D $(GIT_REMOTE_BRANCH) || true
git checkout -b $(GIT_REMOTE_BRANCH)
for i in $(shell cat .$(GIT_REMOTE_BRANCH) | grep -v "^#" | grep "[^ ]"); do \
git merge --no-edit $$i; \
done
git push -f $(GIT_REMOTE_NAME) HEAD:$(GIT_REMOTE_BRANCH)
# Pull the ds-test branch
ds-pull:
git checkout master
git branch -D $(GIT_REMOTE_BRANCH) || true
git pull $(GIT_REMOTE_NAME) $(GIT_REMOTE_BRANCH)
git checkout $(GIT_REMOTE_BRANCH)
# Add the remote - set DS_REMOTE_URL=htps://example.com/ on the command line
ds-remote:
git remote add $(GIT_REMOTE_NAME) $(DS_REMOTE_URL)
# Refresh the current DevStack checkout nd re-initialize
refresh: unstack ds-pull stack