Updated build system versioning
This commit is contained in:
Родитель
fd53bde00b
Коммит
483219960b
16
README.md
16
README.md
|
@ -36,19 +36,19 @@ You can also download bleeding edge builds from the CI server:
|
||||||
|
|
||||||
| Platform | Type | Download |
|
| Platform | Type | Download |
|
||||||
|-----------------------|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|-----------------------|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| Windows 32-bit | Installer | [BatchEncoder-0.1-Win32-(Debug).exe](https://ci.appveyor.com/api/projects/wieslawsoltes/batchencoder/artifacts/artifacts/BatchEncoder-0.1-Win32-(Debug).exe) |
|
| Windows 32-bit | Installer | [BatchEncoder-1.0-alpha-Win32-(Debug).exe](https://ci.appveyor.com/api/projects/wieslawsoltes/batchencoder/artifacts/artifacts/BatchEncoder-1.0-alpha-Win32-(Debug).exe) |
|
||||||
| Windows 64-bit | Installer | [BatchEncoder-0.1-x64-(Debug).exe](https://ci.appveyor.com/api/projects/wieslawsoltes/batchencoder-3gv5t/artifacts/artifacts/BatchEncoder-0.1-x64-(Debug).exe) |
|
| Windows 64-bit | Installer | [BatchEncoder-1.0-alpha-x64-(Debug).exe](https://ci.appveyor.com/api/projects/wieslawsoltes/batchencoder-3gv5t/artifacts/artifacts/BatchEncoder-1.0-alpha-x64-(Debug).exe) |
|
||||||
| Windows 32-bit | Portable | [BatchEncoder-0.1-Win32-(Debug).zip](https://ci.appveyor.com/api/projects/wieslawsoltes/BatchEncoder/artifacts/artifacts/BatchEncoder-0.1-Win32-(Debug).zip) |
|
| Windows 32-bit | Portable | [BatchEncoder-1.0-alpha-Win32-(Debug).zip](https://ci.appveyor.com/api/projects/wieslawsoltes/BatchEncoder/artifacts/artifacts/BatchEncoder-1.0-alpha-Win32-(Debug).zip) |
|
||||||
| Windows 64-bit | Portable | [BatchEncoder-0.1-x64-(Debug).zip](https://ci.appveyor.com/api/projects/wieslawsoltes/batchencoder-3gv5t/artifacts/artifacts/BatchEncoder-0.1-x64-(Debug).zip) |
|
| Windows 64-bit | Portable | [BatchEncoder-1.0-alpha-x64-(Debug).zip](https://ci.appveyor.com/api/projects/wieslawsoltes/batchencoder-3gv5t/artifacts/artifacts/BatchEncoder-1.0-alpha-x64-(Debug).zip) |
|
||||||
|
|
||||||
#### Release Builds
|
#### Release Builds
|
||||||
|
|
||||||
| Platform | Type | Download |
|
| Platform | Type | Download |
|
||||||
|-----------------------|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|-----------------------|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| Windows 32-bit | Installer | [BatchEncoder-0.1-Win32.exe](https://ci.appveyor.com/api/projects/wieslawsoltes/batchencoder-y606d/artifacts/artifacts/BatchEncoder-0.1-Win32.exe) |
|
| Windows 32-bit | Installer | [BatchEncoder-1.0-alpha-Win32.exe](https://ci.appveyor.com/api/projects/wieslawsoltes/batchencoder-y606d/artifacts/artifacts/BatchEncoder-1.0-alpha-Win32.exe) |
|
||||||
| Windows 64-bit | Installer | [BatchEncoder-0.1-x64.exe](https://ci.appveyor.com/api/projects/wieslawsoltes/batchencoder-1fq40/artifacts/artifacts/BatchEncoder-0.1-x64.exe) |
|
| Windows 64-bit | Installer | [BatchEncoder-1.0-alpha-x64.exe](https://ci.appveyor.com/api/projects/wieslawsoltes/batchencoder-1fq40/artifacts/artifacts/BatchEncoder-1.0-alpha-x64.exe) |
|
||||||
| Windows 64-bit | Portable | [BatchEncoder-0.1-x64.zip](https://ci.appveyor.com/api/projects/wieslawsoltes/batchencoder-1fq40/artifacts/artifacts/BatchEncoder-0.1-x64.zip) |
|
| Windows 64-bit | Portable | [BatchEncoder-1.0-alpha-x64.zip](https://ci.appveyor.com/api/projects/wieslawsoltes/batchencoder-1fq40/artifacts/artifacts/BatchEncoder-1.0-alpha-x64.zip) |
|
||||||
| Windows 32-bit | Portable | [BatchEncoder-0.1-Win32.zip](https://ci.appveyor.com/api/projects/wieslawsoltes/batchencoder-y606d/artifacts/artifacts/BatchEncoder-0.1-Win32.zip) |
|
| Windows 32-bit | Portable | [BatchEncoder-1.0-alpha-Win32.zip](https://ci.appveyor.com/api/projects/wieslawsoltes/batchencoder-y606d/artifacts/artifacts/BatchEncoder-1.0-alpha-Win32.zip) |
|
||||||
|
|
||||||
## About
|
## About
|
||||||
|
|
||||||
|
|
10
build.cake
10
build.cake
|
@ -76,13 +76,21 @@ var packageInstallersAction = new Action<string,string> ((configuration, platfor
|
||||||
// VERSION
|
// VERSION
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
var isLocalBuild = BuildSystem.IsLocalBuild;
|
||||||
|
var isPullRequest = BuildSystem.AppVeyor.Environment.PullRequest.IsPullRequest;
|
||||||
|
var isMainRepo = StringComparer.OrdinalIgnoreCase.Equals("wieslawsoltes/BatchEncoder", BuildSystem.AppVeyor.Environment.Repository.Name);
|
||||||
|
var isMasterBranch = StringComparer.OrdinalIgnoreCase.Equals("master", BuildSystem.AppVeyor.Environment.Repository.Branch);
|
||||||
|
var isTagged = BuildSystem.AppVeyor.Environment.Repository.Tag.IsTag
|
||||||
|
&& !string.IsNullOrWhiteSpace(BuildSystem.AppVeyor.Environment.Repository.Tag.Name);
|
||||||
|
var isRelease = !isLocalBuild && !isPullRequest && isMainRepo && isMasterBranch && isTagged;
|
||||||
|
|
||||||
var text = System.IO.File.ReadAllText(versionHeaderPath.FullPath);
|
var text = System.IO.File.ReadAllText(versionHeaderPath.FullPath);
|
||||||
var split = text.Split(new char [] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
|
var split = text.Split(new char [] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
var major = split[0].Split(new char [] { ' ' }, StringSplitOptions.RemoveEmptyEntries)[2];
|
var major = split[0].Split(new char [] { ' ' }, StringSplitOptions.RemoveEmptyEntries)[2];
|
||||||
var minor = split[1].Split(new char [] { ' ' }, StringSplitOptions.RemoveEmptyEntries)[2];
|
var minor = split[1].Split(new char [] { ' ' }, StringSplitOptions.RemoveEmptyEntries)[2];
|
||||||
var revision = split[2].Split(new char [] { ' ' }, StringSplitOptions.RemoveEmptyEntries)[2];
|
var revision = split[2].Split(new char [] { ' ' }, StringSplitOptions.RemoveEmptyEntries)[2];
|
||||||
var build = split[3].Split(new char [] { ' ' }, StringSplitOptions.RemoveEmptyEntries)[2];
|
var build = split[3].Split(new char [] { ' ' }, StringSplitOptions.RemoveEmptyEntries)[2];
|
||||||
var version = major + "." + minor;
|
var version = major + "." + minor + (isRelease ? "" : "-alpha");
|
||||||
|
|
||||||
Information("Defined Version: {0}.{1}.{2}.{3}", major, minor, revision, build);
|
Information("Defined Version: {0}.{1}.{2}.{3}", major, minor, revision, build);
|
||||||
Information("Release Version: {0}", version);
|
Information("Release Version: {0}", version);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#define VERSION_MAJOR 0
|
#define VERSION_MAJOR 1
|
||||||
#define VERSION_MINOR 1
|
#define VERSION_MINOR 0
|
||||||
#define VERSION_REVISION 0
|
#define VERSION_REVISION 0
|
||||||
#define VERSION_BUILD 0
|
#define VERSION_BUILD 0
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче