|
...
|
...
|
@@ -1226,7 +1226,10 @@ function setup_develop() {
|
|
1226
|
1226
|
echo "cd $REQUIREMENTS_DIR; $SUDO_CMD python update.py $project_dir"
|
|
1227
|
1227
|
|
|
1228
|
1228
|
# Don't update repo if local changes exist
|
|
1229
|
|
- if (cd $project_dir && git diff --quiet); then
|
|
|
1229
|
+ (cd $project_dir && git diff --quiet)
|
|
|
1230
|
+ local update_requirements=$?
|
|
|
1231
|
+
|
|
|
1232
|
+ if [ $update_requirements -eq 0 ]; then
|
|
1230
|
1233
|
(cd $REQUIREMENTS_DIR; \
|
|
1231
|
1234
|
$SUDO_CMD python update.py $project_dir)
|
|
1232
|
1235
|
fi
|
|
...
|
...
|
@@ -1234,6 +1237,11 @@ function setup_develop() {
|
|
1234
|
1234
|
pip_install -e $project_dir
|
|
1235
|
1235
|
# ensure that further actions can do things like setup.py sdist
|
|
1236
|
1236
|
safe_chown -R $STACK_USER $1/*.egg-info
|
|
|
1237
|
+
|
|
|
1238
|
+ # Undo requirements changes, if we made them
|
|
|
1239
|
+ if [ $update_requirements -eq 0 ]; then
|
|
|
1240
|
+ (cd $project_dir && git checkout -- requirements.txt test-requirements.txt setup.py)
|
|
|
1241
|
+ fi
|
|
1237
|
1242
|
}
|
|
1238
|
1243
|
|
|
1239
|
1244
|
|