File tree 7 files changed +82
-33
lines changed
7 files changed +82
-33
lines changed Original file line number Diff line number Diff line change 1
- cd frontend
2
- npm install
3
- npm run build
1
+ #! /bin/bash
2
+ if [ -z " $( ls | grep CONTRIBUTING.md) " ]; then
3
+ echo " Please run the script from repo directory"
4
+ exit -1
5
+ else
6
+ echo " Building the frontend"
7
+ cd frontend
8
+ npm install
9
+ npm run build
10
+ fi
11
+
12
+
13
+
Original file line number Diff line number Diff line change 1
- # Create test requirements under test/requirements.txt using requirements.in
2
- cd test
3
- pip install --upgrade pip-tools
4
- pip-compile
1
+ #! /bin/bash
2
+ if [ -z " $( ls | grep CONTRIBUTING.md) " ]; then
3
+ echo " Please run the script from repo directory"
4
+ exit -1
5
+ else
6
+ echo " Creating requirements under test/requirements.txt using requirements.in"
7
+ cd test
8
+ pip install --upgrade pip-tools
9
+ pip-compile
10
+ fi
Original file line number Diff line number Diff line change 1
- pip install -e .
1
+ #! /bin/bash
2
+ if [ -z " $( ls | grep CONTRIBUTING.md) " ]; then
3
+ echo " Please run the script from repo directory"
4
+ exit -1
5
+ else
6
+ echo " Installing gradio"
7
+ pip install -e .
8
+ fi
9
+
Original file line number Diff line number Diff line change 1
- pip install --upgrade pip
2
- pip install -r gradio.egg-info/requires.txt
3
- pip install -r test/requirements.txt
1
+ #! /bin/bash
2
+ if [ -z " $( ls | grep CONTRIBUTING.md) " ]; then
3
+ echo " Please run the script from repo directory"
4
+ exit -1
5
+ else
6
+ echo " Installing requirements for tests"
7
+ pip install --upgrade pip
8
+ pip install -r gradio.egg-info/requires.txt
9
+ pip install -r test/requirements.txt
10
+ fi
11
+
Original file line number Diff line number Diff line change 1
- cd frontend
2
- npm start
1
+ #! /bin/bash
2
+ if [ -z " $( ls | grep CONTRIBUTING.md) " ]; then
3
+ echo " Please run the script from repo directory"
4
+ exit -1
5
+ else
6
+ echo " Running the frontend"
7
+ cd frontend
8
+ npm start
9
+ fi
Original file line number Diff line number Diff line change 1
- time python -m unittest
1
+ #! /bin/bash
2
+ if [ -z " $( ls | grep CONTRIBUTING.md) " ]; then
3
+ echo " Please run the script from repo directory"
4
+ exit -1
5
+ else
6
+ echo " Running the tests"
7
+ python -m unittest
8
+ fi
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
-
3
- set -e
4
- git pull origin master
5
-
6
- old_version=$( ggrep -Po " (?<=version=\" )[^\" ]+(?=\" )" setup.py)
7
- echo " Current version is $old_version . New version?"
8
- read new_version
9
- gsed -i " s/version=\" $old_version \" /version=\" $new_version \" /g" setup.py
10
-
11
- read -p " frontend updates? " -r
12
- if [[ $REPLY =~ ^[Yy]$ ]]
13
- then
2
+ if [ -z " $( ls | grep CONTRIBUTING.md) " ]; then
3
+ echo " Please run the script from repo directory"
4
+ exit -1
5
+ else
6
+ echo " Uploading to pypi"
7
+ set -e
8
+ git pull origin master
9
+ old_version=$( ggrep -Po " (?<=version=\" )[^\" ]+(?=\" )" setup.py)
10
+ echo " Current version is $old_version . New version?"
11
+ read new_version
12
+ gsed -i " s/version=\" $old_version \" /version=\" $new_version \" /g" setup.py
13
+ read -p " frontend updates? " -r
14
+ if [[ $REPLY =~ ^[Yy]$ ]]
15
+ then
14
16
echo -n $new_version > gradio/version.txt
15
17
cd frontend
16
18
npm run build
17
19
cd ..
18
20
aws s3 cp gradio/templates/frontend s3://gradio/$new_version / --recursive
21
+ fi
22
+ rm -r dist/*
23
+ rm -r build/*
24
+ python3 setup.py sdist bdist_wheel
25
+ python3 -m twine upload dist/*
26
+ git add -A
27
+ git commit -m " updated PyPi version to $new_version "
28
+ git push origin master
19
29
fi
20
30
21
- rm -r dist/*
22
- rm -r build/*
23
- python3 setup.py sdist bdist_wheel
24
- python3 -m twine upload dist/*
25
- git add -A
26
- git commit -m " updated PyPi version to $new_version "
27
- git push origin master
You can’t perform that action at this time.
0 commit comments