5
0
mirror of git://git.proxmox.com/git/proxmox-i18n.git synced 2025-01-03 09:17:40 +03:00

po2js: fallback to dev-build and date for version

we refer to this command in the docs but the -v option is relatively
new and we do not mention it. While it still work without setting
that option it produces a ugly and potentially confusing warning.

Just fallback to "dev-build <local datetime>" in that case.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2021-08-25 16:01:13 +02:00
parent 0a877479b2
commit c08a28406a

View File

@ -88,7 +88,8 @@ foreach my $filename (@ARGV) {
my $json = to_json($catalog, {canonical => 1, utf8 => 1});
my $content = "// $options->{v}\n"; # write version to beginning
my $version = $options->{v} // ("dev-build " . localtime());
my $content = "// $version\n"; # write version to the beginning to better avoid stale cache
my $outfile = $options->{o};