diff --git a/buildnumber.txt b/buildnumber.txt index e39b4bbb..d98ffe80 100644 --- a/buildnumber.txt +++ b/buildnumber.txt @@ -1 +1 @@ -2673 \ No newline at end of file +2674 \ No newline at end of file diff --git a/source/funkin/macros/GitCommitMacro.hx b/source/funkin/macros/GitCommitMacro.hx new file mode 100644 index 00000000..b7227ba7 --- /dev/null +++ b/source/funkin/macros/GitCommitMacro.hx @@ -0,0 +1,16 @@ +package funkin.macros; + +class GitCommitMacro { + public static macro function getCommitNumber() { + #if display + return macro $v{0}; + #else + var proc = new Process('git', ['rev-list', 'HEAD', '--count'], false); + proc.exitCode(true); + + var c = Std.parseInt(proc.stdout.readLine()); + trace(c); + return macro $v{c}; + #end + } +} \ No newline at end of file