-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrelease.sh
More file actions
executable file
·100 lines (84 loc) · 3.32 KB
/
Copy pathrelease.sh
File metadata and controls
executable file
·100 lines (84 loc) · 3.32 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
echo
echo "----------------- updating poetry... -----------------------"
poetry update
poetry install --no-root
echo "----------------- updated -----------------------"
echo; echo
echo
echo "----------------- testing... -----------------------"
poetry run pytest src tests --cov=src --doctest-modules --cov-report term-missing
echo "----------------- tested -----------------------"
echo; echo
#echo
#echo "----------------- gh workflow testing... -----------------------"
#read -p "press enter"
# sudo systemctl enable docker
# sudo systemctl start docker
# coverage xml
# act -j build
# sudo systemctl stop docker
# sudo systemctl disable docker
#echo "----------------- gh workflow -----------------------"
#echo; echo
echo
echo "----------------- docs/black... -----------------------"
read -p "press enter"
#################################################################################
#################################################################################
echo ">>>>>> install project package for better IDE class hierarchy view <<<<<<<<"
echo " (this removes duplicates from IDE class hierarchy)"
$(poetry env activate)
pip install .
#################################################################################
#################################################################################
rm docs -rf
poetry run black -l200 src/ tests/
poetry run pdoc --html --force hosh -o docs
mv docs/hosh/* docs/
rm docs/hosh -rf
git add docs
echo "----------------- docs/black done -----------------------"
echo; echo
echo "---------------- readme ----------------"
poetry run autoreadme -i README-edit.md -s examples/ -o README.md
echo "---------------- readme done ----------------"
echo; echo
#################################################################################
#################################################################################
echo ">>>>>> uninstall project package for IDE class hierarchy <<<<<<<<"
pip uninstall hosh -y
deactivate
#################################################################################
#################################################################################
echo; echo
echo "×××××××××××××××× version bump ××××××××××××××××"
read -p "press enter"
poetry version patch
echo "--------------- version bumped --------------"
echo; echo
echo "------------------ current status -----------------------"
git status
echo "------------------ current status shown-----------------"
echo; echo
echo "------------------ commit --------------------"
read -p "press enter"
git commit -am "Release"
echo "------------------ commited --------------------"
echo; echo
echo "------------------ new status... -----------------------"
read -p "press enter"
git status
echo "------------------ new status shown --------------------"
echo; echo
echo "------------------- tag ----------------------"
read -p "press enter"
git tag "v$(poetry version | cut -d' ' -f2)" -m "Release v$(poetry version | cut -d' ' -f2)"
echo "------------------- tagged ----------------------"
echo; echo
echo "------------------- push ----------------------"
read -p "press enter"
git push origin main "v$(poetry version | cut -d' ' -f2)"
echo "------------------- pushed ----------------------"
echo; echo
echo "------------------- publish ----------------------"
poetry publish --build