Skip to content

Commit

Permalink
Tool now prints its build date; fixed argument-less params skipping t…
Browse files Browse the repository at this point in the history
…he next one.
  • Loading branch information
YellowAfterlife committed Jul 30, 2023
1 parent 7e43ae7 commit 52b3147
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
3 changes: 2 additions & 1 deletion AseSync.hx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class AseSync {
}

public static function main_1() {
Sys.println("AceSync v" + tools.Macros.buildDate());
initMeta();

executableDir = Path.directory(Sys.programPath());
Expand All @@ -76,7 +77,7 @@ class AseSync {
default: 0;
}
if (del > 0) {
args.splice(i, 2);
args.splice(i, del);
} else i++;
}

Expand Down
13 changes: 13 additions & 0 deletions tools/Macros.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package tools;

/**
* ...
* @author YellowAfterlife
*/
class Macros {
public static macro function buildDate() {
var now = Date.now();
var nows = DateTools.format(now, "%Y-%m-%d");
return macro $v{nows};
}
}

0 comments on commit 52b3147

Please sign in to comment.