This repository has been archived by the owner on Oct 28, 2019. It is now read-only.
/
install.sh
executable file
·55 lines (47 loc) · 1.7 KB
/
install.sh
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
#!/usr/bin/env sh
set -v
# dev_requirements should not be needed for testing; don't install them to make sure
pip install -r test_requirements.txt
pip install -r doc_requirements.txt
export COMMIT_MSG=$(git show HEAD^2 -s)
export PULP_PR_NUMBER=$(echo $COMMIT_MSG | grep -oP 'Required\ PR:\ https\:\/\/github\.com\/pulp\/pulpcore\/pull\/(\d+)' | awk -F'/' '{print $7}')
export PULP_FILE_PR_NUMBER=$(echo $COMMIT_MSG | grep -oP 'Required\ PR:\ https\:\/\/github\.com\/pulp\/pulp_file\/pull\/(\d+)' | awk -F'/' '{print $7}')
export PULP_SMASH_PR_NUMBER=$(echo $COMMIT_MSG | grep -oP 'Required\ PR:\ https\:\/\/github\.com\/PulpQE\/pulp-smash\/pull\/(\d+)' | awk -F'/' '{print $7}')
if [ -z "$PULP_PR_NUMBER" ]; then
pip install "git+https://github.com/pulp/pulpcore.git#egg=pulpcore"
else
cd ../
git clone https://github.com/pulp/pulpcore.git
cd pulpcore
git fetch origin +refs/pull/$PULP_PR_NUMBER/merge
git checkout FETCH_HEAD
pip install -e .
cd ../pulpcore-plugin
fi
pip install -e .
if [ "$TEST" = 'docs' ]; then
pip3 install 'sphinx<1.8.0' sphinxcontrib-openapi sphinx_rtd_theme
return "$?"
fi
if [ -z "$PULP_FILE_PR_NUMBER" ]; then
pip install git+https://github.com/pulp/pulp_file.git#egg=pulp_file
else
cd ../
git clone https://github.com/pulp/pulp_file.git
cd pulp_file
git fetch origin +refs/pull/$PULP_FILE_PR_NUMBER/merge
git checkout FETCH_HEAD
pip install -e .
cd ../pulpcore-plugin
fi
if [ ! -z "$PULP_SMASH_PR_NUMBER" ]; then
pip uninstall -y pulp-smash
cd ../
git clone https://github.com/PulpQE/pulp-smash.git
cd pulp-smash
git fetch origin +refs/pull/$PULP_SMASH_PR_NUMBER/merge
git checkout FETCH_HEAD
pip install -e .
cd ../pulpcore-plugin
fi
pip install -e .