Skip to content

Commit da002fb

Browse files
bumping version 1.0.0 to 2.0.0 (Py-Contributors#50)
* adding scripts for release automation * v2.0.0 releasing
1 parent 41da8a2 commit da002fb

File tree

6 files changed

+35
-47
lines changed

6 files changed

+35
-47
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<a href="https://pypi.org/project/random-profile/">
44
Random Profile Generator
55
</a>
6-
V1.0.1
6+
V2.0.0
77
</h1>
88

99
<h4 align="center">Python Module To Generate Random Profile Data</h4>

random_profile/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from random_profile.utils import generate_random_height_weight
1717
from random_profile.utils import ASSETS_DIR
1818

19-
VERSION = '1.0.1'
19+
VERSION = '2.0.0'
2020

2121
fname_txt = os.path.join(ASSETS_DIR, 'fnames.txt')
2222
lname_txt = os.path.join(ASSETS_DIR, 'lnames.txt')

scripts/release.sh

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,4 @@
11
#!/bin/bash
2-
if ! [ -x "$(command -v flake8)" ]; then
3-
echo 'Error: flake8 is not installed.' >&2
4-
echo 'Installing flake8...'
5-
pip install flake8
6-
fi
7-
8-
if ! [ -x "$(command -v twine)" ]; then
9-
echo 'Error: twine is not installed.' >&2
10-
echo 'Installing twine...'
11-
pip install twine
12-
fi
13-
142
check_command() {
153
if [ ! -x "$(command -v $1)" ]; then
164
echo "$1 is not installed"
@@ -19,28 +7,27 @@ check_command() {
197
fi
208
}
219

22-
# check if the git is installed
23-
check_command git
24-
check_command flake8
25-
check_command twine
26-
27-
if ! [ -f "setup.py" ]; then
28-
echo 'Error: setup.py is not found.' >&2
29-
exit 1
30-
fi
31-
32-
python3 setup.py sdist bdist_wheel
33-
3410
check_directory() {
3511
if [ ! -d "$1" ]; then
3612
echo "$1 is not found"
3713
exit 1
3814
fi
3915
}
4016

41-
# check if the dist folder is exist
42-
check_directory dist
17+
check_file() {
18+
if [ ! -f "$1" ]; then
19+
echo "$1 is not found"
20+
exit 1
21+
fi
22+
}
4323

24+
# check if the git is installed
25+
check_command git
26+
check_command flake8
27+
check_command twine
28+
check_file setup.py
29+
python3 setup.py sdist bdist_wheel
30+
check_directory dist
4431
python3 -m twine upload dist/*
4532

4633
rm -rf dist

scripts/test_changes.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,8 @@ check_command git
1414
check_command pytest
1515
check_command flake8
1616

17-
# run flask8 and pytest
18-
19-
flake8
20-
pytest -e
17+
flake8 . --isolated --exclude=.cache,.venv,.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,**/migrations/** --ignore=E501,E402
18+
pytest
2119

2220
# check the exit code of the last command
2321
if [ $? -eq 0 ]; then

scripts/test_release.sh

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,27 @@ check_command() {
77
fi
88
}
99

10-
# check if the git is installed
11-
check_command git
12-
check_command flake8
13-
check_command twine
14-
15-
if ! [ -f "setup.py" ]; then
16-
echo 'Error: setup.py is not found.' >&2
17-
exit 1
18-
fi
19-
20-
python3 setup.py --repository testpypi dist/*
21-
2210
check_directory() {
2311
if [ ! -d "$1" ]; then
2412
echo "$1 is not found"
2513
exit 1
2614
fi
2715
}
2816

29-
# check if the dist folder is exist
30-
check_directory dist
17+
check_file() {
18+
if [ ! -f "$1" ]; then
19+
echo "$1 is not found"
20+
exit 1
21+
fi
22+
}
3123

24+
# check if the git is installed
25+
check_command git
26+
check_command flake8
27+
check_command twine
28+
check_file setup.py
29+
python3 setup.py sdist bdist_wheel
30+
check_directory dist
3231
python3 -m twine upload --repository testpypi dist/*
3332

3433
rm -rf dist

setup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,18 @@
44
with open("README.md", "r") as fh:
55
long_description = fh.read()
66

7+
with open("requirements.txt", "r") as fh:
8+
requirements = fh.read().splitlines()
9+
710
setuptools.setup(
811
name="random_profile",
9-
version="1.0.1",
12+
version="2.0.0",
1013
author="Deepak Raj",
1114
author_email="[email protected]",
1215
description="Generate Random Profile",
1316
long_description=long_description,
1417
long_description_content_type="text/markdown",
18+
install_requires=requirements,
1519
data_files=[('assets', glob('random_profile/assets/*'))],
1620
url="https://github.com/codePerfectPlus/Random-Profile-Generator",
1721
packages=setuptools.find_packages(),

0 commit comments

Comments
 (0)