Skip to content

Commit

Permalink
Version control in app.
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardofilo committed Aug 12, 2020
1 parent 6f59c22 commit 83ba85d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ def save():
line = "\n%s,%r,%s" % (system['name'], system['enabled'], SEPARATOR.join(system['dirs']))
systems = systems + line
config_ini.set('DEFAULT', 'systems', systems)
with open(settings.CONFIG_FILE, 'wb') as configfile:
with open(settings.CONFIG_FILE, 'w') as configfile:
config_ini.write(configfile)
2 changes: 1 addition & 1 deletion header.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def render():
pygame.draw.rect(settings.screen, BACK_COLOR, (0, 0, 320, 18))
pygame.draw.rect(settings.screen, BACK_COLOR, (2, 18, 316, 2))
pygame.draw.lines(settings.screen, FRONT_COLOR, False, [(0, 0), (0,17), (2,19), (317,19), (319,17), (319,0)])
textsurface = settings.font.render('Py Backup', False, TEXT_COLOR)
textsurface = settings.font.render('Py Backup %s' % (settings.V), False, TEXT_COLOR)
settings.screen.blit(textsurface,(10,3))
if len(settings.config) > 0:
textsurface = settings.font.render(str(settings.selected+1) + "/" + str(len(settings.config)), False, TEXT_COLOR)
Expand Down
3 changes: 2 additions & 1 deletion make_opk.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

OPK_NAME=py_backup.opk
OPK_NAME=py_backup_`cat v`.opk

echo ${OPK_NAME}

Expand All @@ -27,6 +27,7 @@ FLIST="${FLIST} keys.py"
FLIST="${FLIST} main.py"
FLIST="${FLIST} settings.py"
FLIST="${FLIST} states.py"
FLIST="${FLIST} v"
FLIST="${FLIST} resources"
FLIST="${FLIST} py_backup.png"
FLIST="${FLIST} py_backup.sh"
Expand Down
3 changes: 3 additions & 0 deletions settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
SCREEN_W = 320
SCREEN_H = 240
FPS = 15
v_file = open("v", "r")
V = v_file.readline()[:-1]
v_file.close()

# Vars
config = []
Expand Down
1 change: 1 addition & 0 deletions v
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.2

0 comments on commit 83ba85d

Please sign in to comment.