Skip to content

Commit 8de30a5

Browse files
author
Pipeline
committed
e Updated DevOps Script
1 parent f329b59 commit 8de30a5

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

BuildMobTimer.py

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
1+
import os
2+
13
import subprocess
2-
from shutil import copy, copytree, rmtree
4+
from shutil import copy, copytree, make_archive, rmtree
5+
import time
36

4-
rmtree('./dist')
7+
dist_path = './dist'
8+
rmtree(dist_path)
59
py_installer_command = 'pyinstaller --clean --onefile --windowed MobTimer.spec'.split(" ")
610

7-
# Run py installer
811
subprocess.run(py_installer_command)
912

10-
# Copy files MobTimer.spec and TimeBomb icon into dist/ directory
11-
12-
1313
copy('./MobTimer.cfg', './dist/MobTimer.cfg')
1414
copy('./time-bomb.ico', './dist/time-bomb.ico')
1515
copytree('./Themes', './dist/Themes')
1616
copytree('./Tips', './dist/Tips')
1717
copytree('./Images', './dist/Images')
18+
19+
time_for_filename = time.strftime("%Y%m%d-%H%M%S")
20+
output_filename = 'MobTimer' + time_for_filename
21+
22+
builds_path = './builds/'
23+
if not os.path.exists(builds_path):
24+
os.makedirs(builds_path)
25+
26+
make_archive(builds_path + output_filename, 'zip', dist_path)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ When we started mob programming we originally used a phone timer to time the rot
1515
- Screen will be blocked when timer runs out
1616
- Switch the person at the keyboard to the new driver
1717
- Repeat
18-
- To stop timer mid session open the exe again
18+
- To stop timer mid-session, open the exe again
1919

2020
## Random Tips
2121
Tips are maintained in the Tips folder. A random file is selected and a random line from the random file is displayed. To add or remove tips simply add or remove files and lines from files.

0 commit comments

Comments
 (0)