-
Notifications
You must be signed in to change notification settings - Fork 454
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add target to automate tagging of releases
When debugging, it's very useful to know which version a player is using. The version is now displayed in the title bar.
- Loading branch information
1 parent
6e0ef53
commit 98a9110
Showing
3 changed files
with
51 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
""" | ||
Bump the version number | ||
""" | ||
import os | ||
import argparse | ||
|
||
parser = argparse.ArgumentParser() | ||
parser.add_argument('action', choices=['bump', 'current']) | ||
args = parser.parse_args() | ||
|
||
version = None | ||
title = None | ||
|
||
for line in open('src/conf.lua'): | ||
line = line.strip() | ||
if 't.title' not in line: | ||
continue | ||
_, full_title = line.replace('"', '').split('=') | ||
title, current = full_title.strip().rsplit(' ', 1) | ||
x, y, z = current.split('.') | ||
|
||
z = int(z) + (1 if args.action == 'bump' else 0) | ||
|
||
version = "{}.{}.{}".format(x,y,z) | ||
|
||
if not title or not version: | ||
print "Could not find version number" | ||
exit(1) | ||
|
||
if version == '0.8.0': | ||
print "This is the LOVE version, not safe" | ||
exit(1) | ||
|
||
print version | ||
exit(0) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
function love.conf(t) | ||
t.title = "Journey to the Center of Hawkthorne" | ||
t.title = "Journey to the Center of Hawkthorne v0.0.1" | ||
t.author = "Kyle Conroy" | ||
t.version = "0.8.0" | ||
t.identity = "hawkthorne" | ||
t.screen.width = 768 | ||
t.screen.height = 528 | ||
t.console = false | ||
t.modules.physics = false | ||
t.modules.joystick = false | ||
t.release = false | ||
end |