Added script for creating release tags.
This commit is contained in:
parent
1c349af445
commit
310a665595
3 changed files with 32 additions and 2 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
0.2408.32209
|
||||
0.2408.32219
|
||||
|
|
30
tools/create-tag
Executable file
30
tools/create-tag
Executable file
|
@ -0,0 +1,30 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
$path = (function($path) {
|
||||
if(!str_starts_with($path, '/'))
|
||||
die('Cannot be bothered to support non-UNIX style paths, sorry!' . PHP_EOL);
|
||||
|
||||
while($path !== '/') {
|
||||
$vPath = $path . DIRECTORY_SEPARATOR . 'VERSION';
|
||||
if(is_file($vPath))
|
||||
return $vPath;
|
||||
|
||||
$path = dirname($path);
|
||||
}
|
||||
})(__DIR__);
|
||||
|
||||
$version = file_get_contents($path);
|
||||
if($version === false)
|
||||
die('Failed to read VERSION file.' . PHP_EOL);
|
||||
$version = trim($version);
|
||||
|
||||
$workingDir = getcwd();
|
||||
try {
|
||||
chdir(dirname($path));
|
||||
echo shell_exec(sprintf('git tag v%s', $version));
|
||||
echo shell_exec(sprintf('git push origin v%s', $version));
|
||||
} finally {
|
||||
chdir($workingDir);
|
||||
}
|
||||
|
||||
echo $version . PHP_EOL;
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
pushd .
|
||||
cd $(dirname "$0")
|
||||
|
|
Loading…
Reference in a new issue