Rogue 'bin' directory fix

This commit is contained in:
Joshua Granick
2014-12-17 16:01:04 -08:00
parent fdf7b31b15
commit 63c1b52219

View File

@@ -924,25 +924,27 @@ class CommandLineTools {
var versionFile = PathHelper.combine (project.app.path, ".build");
var version = 1;
PathHelper.mkdir (project.app.path);
if (FileSystem.exists (versionFile)) {
try {
var previousVersion = Std.parseInt (File.getBytes (versionFile).toString ());
if (previousVersion != null) {
if (FileSystem.exists (versionFile)) {
version = previousVersion;
var previousVersion = Std.parseInt (File.getBytes (versionFile).toString ());
if (increment) {
if (previousVersion != null) {
version ++;
version = previousVersion;
if (increment) {
version ++;
}
}
}
}
} catch (e:Dynamic) {}
project.meta.buildNumber = Std.string (version);
@@ -950,6 +952,8 @@ class CommandLineTools {
try {
PathHelper.mkdir (project.app.path);
var output = File.write (versionFile, false);
output.writeString (Std.string (version));
output.close ();