git commit number (UNFINISHED)
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
2673
|
||||
2674
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user