]> git.lizzy.rs Git - dragonblocks.git/blobdiff - api.php
Replace snapshot number by commit id in version string
[dragonblocks.git] / api.php
diff --git a/api.php b/api.php
index 0922620ce819a05b2bc18d5ef89452deed7890e1..3479aaf0521830e02606a7b6f8a307d18ae084ff 100755 (executable)
--- a/api.php
+++ b/api.php
@@ -50,5 +50,8 @@
                        file_put_contents("worlds/" . $_POST["name"] . "/world.json", $_POST["world"]);
                        file_put_contents("worlds/" . $_POST["name"] . "/owner.txt", get_username());
                        break;
+               case "commitID":
+                       echo shell_exec("git rev-parse --short HEAD");
+                       break;
        }
 ?>