Skip to content

Commit

Permalink
Merge pull request #98 from vktr/f/portable-package-build-task
Browse files Browse the repository at this point in the history
Add build task for portable zip package (incl. pdb).
  • Loading branch information
vktr committed Jan 20, 2016
2 parents e69e2f1 + 4ba51f6 commit 1506ade
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
6 changes: 3 additions & 3 deletions appveyor.yml
Expand Up @@ -13,9 +13,9 @@ environment:
build_script:
- powershell -NoProfile -ExecutionPolicy unrestricted -Command .\build.ps1 -Platform %platform%

# Publish artifacts (installer)
# Publish artifacts (installer and portable zip)
artifacts:
- path: build-*/Release/PicoTorrent-*-x64.exe
- path: build-*/Release/PicoTorrent-*-x86.exe
- path: build-*/Release/PicoTorrent-*-*.exe
- path: build-*/Release/PicoTorrent-*-*.zip

test: off
20 changes: 18 additions & 2 deletions build.cake
Expand Up @@ -17,6 +17,7 @@ var SigningPassword = EnvironmentVariable("PICO_SIGNING_PASSWORD");
var Version = System.IO.File.ReadAllText("VERSION").Trim();
var Installer = string.Format("PicoTorrent-{0}-{1}.msi", Version, platform);
var InstallerBundle = string.Format("PicoTorrent-{0}-{1}.exe", Version, platform);
var PortablePackage = string.Format("PicoTorrent-{0}-{1}.zip", Version, platform);

public void SignTool(FilePath file)
{
Expand Down Expand Up @@ -151,6 +152,19 @@ Task("Build-Installer-Bundle")
});
});

Task("Build-Portable-Package")
.IsDependentOn("Build")
.Does(() =>
{
var files = new FilePath[]
{
BuildDirectory + File("PicoTorrent.exe"),
BuildDirectory + File("PicoTorrent.pdb")
};
Zip(BuildDirectory, BuildDirectory + File(PortablePackage), files);
});

Task("Build-Chocolatey-Package")
.IsDependentOn("Build-Installer")
.Does(() =>
Expand Down Expand Up @@ -220,7 +234,8 @@ Task("Sign-Installer-Bundle")
Task("Default")
.IsDependentOn("Build-Installer")
.IsDependentOn("Build-Installer-Bundle")
.IsDependentOn("Build-Chocolatey-Package");
.IsDependentOn("Build-Chocolatey-Package")
.IsDependentOn("Build-Portable-Package");

Task("Publish")
.IsDependentOn("Build")
Expand All @@ -229,7 +244,8 @@ Task("Publish")
.IsDependentOn("Build-Installer-Bundle")
.IsDependentOn("Sign-Installer")
.IsDependentOn("Sign-Installer-Bundle")
.IsDependentOn("Build-Chocolatey-Package");
.IsDependentOn("Build-Chocolatey-Package")
.IsDependentOn("Build-Portable-Package");

//////////////////////////////////////////////////////////////////////
// EXECUTION
Expand Down

0 comments on commit 1506ade

Please sign in to comment.