File tree Expand file tree Collapse file tree 3 files changed +49
-29
lines changed Expand file tree Collapse file tree 3 files changed +49
-29
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ dependencies:
26
26
if [ ! -d $( ROOT_DIR) /venv ]; then python3 -m venv $( ROOT_DIR) /venv; fi
27
27
source $(ROOT_DIR ) /venv/bin/activate; python -m pip install wheel; yes w | python -m pip install -e .
28
28
29
+ upgrade_dependencies : venv
30
+ source $(ROOT_DIR ) /venv/bin/activate; ./bin/upgrade_dependencies.sh $(ROOT_DIR ) /requirements.txt
31
+
29
32
application :
30
33
if [ ! -d $( ROOT_DIR) /venv ]; then python3 -m venv $( ROOT_DIR) /venv; fi
31
34
source $(ROOT_DIR ) /venv/bin/activate; python -m pip install wheel; yes w | python -m pip install -r requirements.txt
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ REQUIREMENTS_FILE=$1
4
+
5
+ while read p; do
6
+ if [[ -z " ${p// } " ]]; then
7
+ continue
8
+ fi
9
+ if [[ " ${p// } " == \# * ]]; then
10
+ continue
11
+ fi
12
+
13
+ count=$( echo ${p// } | wc -m)
14
+ if (( count < 3 )) ; then
15
+ continue
16
+ fi
17
+
18
+ program=$( echo $p | cut -d= -f1)
19
+ curr_version=$( cat ./requirements.txt | grep " ${program} ==" | cut -d' =' -f3 | sed ' s/[^0-9.]*//g' )
20
+ PACKAGE_JSON_URL=" https://pypi.python.org/pypi/${program} /json"
21
+ version=$( curl -L -s " $PACKAGE_JSON_URL " | jq -r ' .releases | keys | .[]' | sed ' /^[^[:alpha:]]*$/!d' | sort -V | tail -1 | sed ' s/[^0-9.]*//g' )
22
+
23
+ if [ " $curr_version " != " $version " ]; then
24
+ echo " Updating requirements for ${program} from ${curr_version} to ${version} ."
25
+ sed -i -e " s/${program} ==.*/${program} ==${version} /g" $REQUIREMENTS_FILE
26
+ fi
27
+
28
+ done < $REQUIREMENTS_FILE
29
+
30
+ # OSX Creates a backup file.
31
+ rm -f " ${REQUIREMENTS_FILE} -e"
Original file line number Diff line number Diff line change 1
- amqp == 2.3.2
2
- asn1crypto == 0.24.0
3
- billiard == 3.5.0.4
4
- celery == 4.2.1
5
- certifi == 2018.8.13
6
- cffi == 1.11.5
7
- chardet == 3.0.4
8
- click == 6.7
9
- cryptography == 2.3.1
1
+
2
+ # Frameworks
3
+ celery == 4.3.0
4
+ click == 7.0
10
5
Flask == 1.0.2
11
- gitconsensus == 0.7.2
12
- github3.py == 1.1.0
13
- github3apps.py == 0.1.3
14
- idna == 2.6
15
- itsdangerous == 0.24
16
- Jinja2 == 2.10
17
- kombu == 4.2.1
18
- MarkupSafe == 1.0
19
- pycparser == 2.18
20
- PyJWT == 1.6.4
21
- python-dateutil == 2.7.3
22
- pytz == 2018.5
23
- PyYAML == 3.12
24
- requests == 2.18.4
25
- semantic-version == 2.6.0
26
- six == 1.11.0
27
- uritemplate == 3.0.0
28
- urllib3 == 1.22
29
- vine == 1.1.4
30
- Werkzeug == 0.14.1
6
+
7
+
8
+ # Git
9
+ gitconsensus == 0.7.3
10
+ github3.py == 1.3.0
11
+ github3apps.py == 0.1.4
12
+
13
+
14
+ # Libraries
15
+ PyYAML == 5.1
16
+ requests == 2.21.0
You can’t perform that action at this time.
0 commit comments