mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 21:03:17 -07:00
parent
9a3e324265
commit
4a0e01054a
4 changed files with 38 additions and 30 deletions
1
GitVersion.yml
Normal file
1
GitVersion.yml
Normal file
|
@ -0,0 +1 @@
|
||||||
|
next-version: 3.0.0
|
|
@ -1,12 +1,6 @@
|
||||||
version: 3.0.{build}
|
version: 3.0.{build}
|
||||||
configuration: Release
|
configuration: Release
|
||||||
os: Visual Studio 2015
|
os: Visual Studio 2015
|
||||||
dotnet_csproj:
|
|
||||||
patch: true
|
|
||||||
file: '**\*.csproj'
|
|
||||||
version: '{version}-$(APPVEYOR_REPO_BRANCH)'
|
|
||||||
package_version: '{version}'
|
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
nodejs_version: "7.8.0"
|
nodejs_version: "7.8.0"
|
||||||
|
|
||||||
|
@ -35,6 +29,8 @@ after_build:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#cache:
|
||||||
|
#- '%USERPROFILE%\.nuget\packages'
|
||||||
deploy:
|
deploy:
|
||||||
- provider: GitHub
|
- provider: GitHub
|
||||||
release: Ombi v$(appveyor_build_version)
|
release: Ombi v$(appveyor_build_version)
|
||||||
|
|
53
build.cake
53
build.cake
|
@ -1,14 +1,16 @@
|
||||||
#tool "xunit.runner.console"
|
#tool "xunit.runner.console"
|
||||||
|
#tool "nuget:?package=GitVersion.CommandLine"
|
||||||
#addin "Cake.Gulp"
|
#addin "Cake.Gulp"
|
||||||
#addin "Cake.Npm"
|
#addin "Cake.Npm"
|
||||||
#addin "SharpZipLib"
|
#addin "SharpZipLib"
|
||||||
#addin "Cake.Compression"
|
#addin "Cake.Compression"
|
||||||
|
#addin "Cake.Incubator"
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// ARGUMENTS
|
// ARGUMENTS
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
var target = Argument("target", "Default");
|
var target = Argument("target", "Build");
|
||||||
var configuration = Argument("configuration", "Release");
|
var configuration = Argument("configuration", "Release");
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
@ -22,13 +24,13 @@ var projDir = "./src/"; // Project Directory
|
||||||
var webProjDir = "./src/Ombi";
|
var webProjDir = "./src/Ombi";
|
||||||
var csProj = "./src/Ombi/Ombi.csproj"; // Path to the project.csproj
|
var csProj = "./src/Ombi/Ombi.csproj"; // Path to the project.csproj
|
||||||
var solutionFile = "Ombi.sln"; // Solution file if needed
|
var solutionFile = "Ombi.sln"; // Solution file if needed
|
||||||
|
GitVersion versionInfo = null;
|
||||||
|
|
||||||
var buildSettings = new DotNetCoreBuildSettings
|
var buildSettings = new DotNetCoreBuildSettings
|
||||||
{
|
{
|
||||||
Framework = "netcoreapp1.1",
|
Framework = "netcoreapp1.1",
|
||||||
Configuration = "Release",
|
Configuration = "Release",
|
||||||
OutputDirectory = Directory(buildDir),
|
OutputDirectory = Directory(buildDir),
|
||||||
VersionSuffix = GetVersion(),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var publishSettings = new DotNetCorePublishSettings
|
var publishSettings = new DotNetCorePublishSettings
|
||||||
|
@ -36,7 +38,6 @@ var publishSettings = new DotNetCorePublishSettings
|
||||||
Framework = "netcoreapp1.1",
|
Framework = "netcoreapp1.1",
|
||||||
Configuration = "Release",
|
Configuration = "Release",
|
||||||
OutputDirectory = Directory(buildDir),
|
OutputDirectory = Directory(buildDir),
|
||||||
VersionSuffix = GetVersion(),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var artifactsFolder = buildDir + "/netcoreapp1.1/";
|
var artifactsFolder = buildDir + "/netcoreapp1.1/";
|
||||||
|
@ -47,19 +48,7 @@ var debianArtifactsFolder = artifactsFolder + "debian.8-x64/published";
|
||||||
var centosArtifactsFolder = artifactsFolder + "centos.7-x64/published";
|
var centosArtifactsFolder = artifactsFolder + "centos.7-x64/published";
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
// Helper
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
public string GetVersion()
|
|
||||||
{
|
|
||||||
if (AppVeyor.IsRunningOnAppVeyor) {
|
|
||||||
// Update the version
|
|
||||||
return AppVeyor.Environment.Build.Version;
|
|
||||||
//AppVeyor.Environment.Repository.Branch;
|
|
||||||
}
|
|
||||||
return "3.0.100";
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// TASKS
|
// TASKS
|
||||||
|
@ -69,13 +58,35 @@ Task("Clean")
|
||||||
.Does(() =>
|
.Does(() =>
|
||||||
{
|
{
|
||||||
CleanDirectory(buildDir);
|
CleanDirectory(buildDir);
|
||||||
CleanDirectory(nodeModulesDir);
|
//CleanDirectory(nodeModulesDir);
|
||||||
CleanDirectory(wwwRootDistDir);
|
CleanDirectory(wwwRootDistDir);
|
||||||
});
|
});
|
||||||
|
|
||||||
Task("Restore")
|
Task("SetVersionInfo")
|
||||||
.IsDependentOn("Clean")
|
.IsDependentOn("Clean")
|
||||||
.IsDependentOn("Gulp Publish")
|
.Does(() =>
|
||||||
|
{
|
||||||
|
var settings = new GitVersionSettings {
|
||||||
|
RepositoryPath = ".",
|
||||||
|
};
|
||||||
|
|
||||||
|
if (AppVeyor.IsRunningOnAppVeyor) {
|
||||||
|
settings.Branch = AppVeyor.Environment.Repository.Branch;
|
||||||
|
} else {
|
||||||
|
settings.Branch = "master";
|
||||||
|
}
|
||||||
|
|
||||||
|
versionInfo = GitVersion(settings);
|
||||||
|
|
||||||
|
Information("GitResults -> {0}", versionInfo.Dump());
|
||||||
|
|
||||||
|
buildSettings.ArgumentCustomization = args => args.Append("/p:SemVer=" + versionInfo.BuildMetaData);
|
||||||
|
publishSettings.ArgumentCustomization = args => args.Append("/p:SemVer=" + versionInfo.BuildMetaData);
|
||||||
|
});
|
||||||
|
|
||||||
|
Task("Restore")
|
||||||
|
.IsDependentOn("SetVersionInfo")
|
||||||
|
//.IsDependentOn("Gulp Publish")
|
||||||
.Does(() =>
|
.Does(() =>
|
||||||
{
|
{
|
||||||
DotNetCoreRestore(projDir);
|
DotNetCoreRestore(projDir);
|
||||||
|
@ -123,9 +134,9 @@ Task("Package")
|
||||||
|
|
||||||
Task("Publish")
|
Task("Publish")
|
||||||
.IsDependentOn("Build")
|
.IsDependentOn("Build")
|
||||||
.IsDependentOn("Publish-Windows")
|
.IsDependentOn("Publish-Windows");
|
||||||
.IsDependentOn("Publish-OSX").IsDependentOn("Publish-Ubuntu").IsDependentOn("Publish-Debian").IsDependentOn("Publish-Centos")
|
//.IsDependentOn("Publish-OSX").IsDependentOn("Publish-Ubuntu").IsDependentOn("Publish-Debian").IsDependentOn("Publish-Centos")
|
||||||
.IsDependentOn("Package");
|
//.IsDependentOn("Package");
|
||||||
|
|
||||||
Task("Publish-Windows")
|
Task("Publish-Windows")
|
||||||
.Does(() =>
|
.Does(() =>
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
<RuntimeIdentifiers>win10-x64;osx.10.12-x64;ubuntu.16.04-x64;debian.8-x64;centos.7-x64;</RuntimeIdentifiers>
|
<RuntimeIdentifiers>win10-x64;osx.10.12-x64;ubuntu.16.04-x64;debian.8-x64;centos.7-x64;</RuntimeIdentifiers>
|
||||||
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
|
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
|
||||||
<TypeScriptToolsVersion>2.3</TypeScriptToolsVersion>
|
<TypeScriptToolsVersion>2.3</TypeScriptToolsVersion>
|
||||||
<AssemblyVersion>3.0.0.0</AssemblyVersion>
|
<AssemblyVersion>$(SemVer)</AssemblyVersion>
|
||||||
<FileVersion>3.0.0.0</FileVersion>
|
<FileVersion>$(SemVer)</FileVersion>
|
||||||
<Version></Version>
|
<Version>$(SemVer)</Version>
|
||||||
<PackageVersion></PackageVersion>
|
<PackageVersion></PackageVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue