summary refs log tree commit diff
path: root/commit
blob: 083d9ccf289bad5963a88a711a33a5e7cf40769d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env bash

cat <<EOF > ModAS.Server/Version.cs
namespace Modas.Server;
#pragma warning disable CS1591
public static class Version
{
    public const string VersionString = "$(git describe --tags --abbrev=0)-$(git rev-parse --abbrev-ref HEAD)(+$(git log $(git describe --tags --abbrev=0)..HEAD --oneline | wc -l)) ($(git rev-parse --short HEAD))";
    public const string Branch = "$(git rev-parse --abbrev-ref HEAD)";
    public const string Tag = "$(git describe --tags --abbrev=0)";
    public const string Commit = "$(git rev-parse HEAD)";
}
#pragma warning restore CS1591
EOF