|
@@ -574,12 +574,13 @@ class RunCi {
|
|
static function deploy():Void {
|
|
static function deploy():Void {
|
|
|
|
|
|
var doDocs = isDeployApiDocsRequired();
|
|
var doDocs = isDeployApiDocsRequired();
|
|
- var doNightlies = isDeployNightlies();
|
|
|
|
|
|
+ var doNightlies = isDeployNightlies(),
|
|
|
|
+ doInstaller = doNightlies && shouldDeployInstaller();
|
|
|
|
|
|
if (doDocs || doNightlies) {
|
|
if (doDocs || doNightlies) {
|
|
changeDirectory(repoDir);
|
|
changeDirectory(repoDir);
|
|
if (doDocs) {
|
|
if (doDocs) {
|
|
- if (Sys.systemName() != 'Windows') {
|
|
|
|
|
|
+ if (systemName != 'Windows') {
|
|
// generate doc
|
|
// generate doc
|
|
runCommand("make", ["-s", "install_dox"]);
|
|
runCommand("make", ["-s", "install_dox"]);
|
|
runCommand("make", ["-s", "package_doc"]);
|
|
runCommand("make", ["-s", "package_doc"]);
|
|
@@ -591,7 +592,12 @@ class RunCi {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (doNightlies) {
|
|
if (doNightlies) {
|
|
- deployNightlies();
|
|
|
|
|
|
+ if (doInstaller && !doDocs && systemName != 'Windows') {
|
|
|
|
+ // generate doc
|
|
|
|
+ runCommand("make", ["-s", "install_dox"]);
|
|
|
|
+ runCommand("make", ["-s", "package_doc"]);
|
|
|
|
+ }
|
|
|
|
+ deployNightlies(doInstaller);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -625,6 +631,17 @@ class RunCi {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ static function shouldDeployInstaller() {
|
|
|
|
+ if (systemName == 'Linux') {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ if (gitInfo.branch == 'nightly-travis') {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ var rev = Sys.getEnv('ADD_REVISION');
|
|
|
|
+ return rev != null && rev != "0";
|
|
|
|
+ }
|
|
|
|
+
|
|
static function isDeployApiDocsRequired () {
|
|
static function isDeployApiDocsRequired () {
|
|
return gitInfo.branch == "development" &&
|
|
return gitInfo.branch == "development" &&
|
|
Sys.getEnv("DEPLOY_API_DOCS") != null &&
|
|
Sys.getEnv("DEPLOY_API_DOCS") != null &&
|
|
@@ -647,7 +664,7 @@ class RunCi {
|
|
/**
|
|
/**
|
|
Deploy source package to hxbuilds s3
|
|
Deploy source package to hxbuilds s3
|
|
*/
|
|
*/
|
|
- static function deployNightlies():Void {
|
|
|
|
|
|
+ static function deployNightlies(doInstaller:Bool):Void {
|
|
var gitTime = commandResult("git", ["show", "-s", "--format=%ct", "HEAD"]).stdout;
|
|
var gitTime = commandResult("git", ["show", "-s", "--format=%ct", "HEAD"]).stdout;
|
|
var tzd = {
|
|
var tzd = {
|
|
var z = Date.fromTime(0);
|
|
var z = Date.fromTime(0);
|
|
@@ -664,7 +681,11 @@ class RunCi {
|
|
) {
|
|
) {
|
|
if (ci == TravisCI) {
|
|
if (ci == TravisCI) {
|
|
runCommand("make", ["-s", "package_unix"]);
|
|
runCommand("make", ["-s", "package_unix"]);
|
|
- if (Sys.systemName() == 'Linux') {
|
|
|
|
|
|
+ if (doInstaller) {
|
|
|
|
+ getLatestNeko();
|
|
|
|
+ runCommand("make", ["-s", 'package_installer_mac']);
|
|
|
|
+ }
|
|
|
|
+ if (systemName == 'Linux') {
|
|
// source
|
|
// source
|
|
for (file in sys.FileSystem.readDirectory('out')) {
|
|
for (file in sys.FileSystem.readDirectory('out')) {
|
|
if (file.startsWith('haxe') && file.endsWith('_src.tar.gz')) {
|
|
if (file.startsWith('haxe') && file.endsWith('_src.tar.gz')) {
|
|
@@ -674,17 +695,32 @@ class RunCi {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
for (file in sys.FileSystem.readDirectory('out')) {
|
|
for (file in sys.FileSystem.readDirectory('out')) {
|
|
- if (file.startsWith('haxe') && file.endsWith('_bin.tar.gz')) {
|
|
|
|
- var name = Sys.systemName() == "Linux" ? 'linux64' : 'mac';
|
|
|
|
- submitToS3(name, 'out/$file');
|
|
|
|
- break;
|
|
|
|
|
|
+ if (file.startsWith('haxe')) {
|
|
|
|
+ if (file.endsWith('_bin.tar.gz')) {
|
|
|
|
+ var name = systemName == "Linux" ? 'linux64' : 'mac';
|
|
|
|
+ submitToS3(name, 'out/$file');
|
|
|
|
+ } else if (file.endsWith('_installer.tar.gz')) {
|
|
|
|
+ submitToS3('mac-installer', 'out/$file');
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
|
|
+ if (doInstaller) {
|
|
|
|
+ getLatestNeko();
|
|
|
|
+ var cygRoot = Sys.getEnv("CYG_ROOT");
|
|
|
|
+ if (cygRoot != null) {
|
|
|
|
+ runCommand('$cygRoot/bin/bash', ['-lc', "cd \"$OLDPWD\" && make -s -f Makefile.win package_installer_win"]);
|
|
|
|
+ } else {
|
|
|
|
+ runCommand("make", ['-f', 'Makefile.win', "-s", 'package_installer_win']);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
for (file in sys.FileSystem.readDirectory('out')) {
|
|
for (file in sys.FileSystem.readDirectory('out')) {
|
|
- if (file.startsWith('haxe') && file.endsWith('_bin.zip')) {
|
|
|
|
- submitToS3('windows', 'out/$file');
|
|
|
|
- break;
|
|
|
|
|
|
+ if (file.startsWith('haxe')) {
|
|
|
|
+ if (file.endsWith('_bin.zip')) {
|
|
|
|
+ submitToS3('windows', 'out/$file');
|
|
|
|
+ } else if (file.endsWith('_installer.zip')) {
|
|
|
|
+ submitToS3('windows-installer', 'out/$file');
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -693,6 +729,23 @@ class RunCi {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ static function getLatestNeko() {
|
|
|
|
+ if (!FileSystem.exists('installer')) {
|
|
|
|
+ FileSystem.createDirectory('installer');
|
|
|
|
+ }
|
|
|
|
+ var src = 'http://nekovm.org/media/neko-2.1.0-';
|
|
|
|
+ var suffix = systemName == 'Windows' ? 'win.zip' : 'osx64.tar.gz';
|
|
|
|
+ src += suffix;
|
|
|
|
+ runCommand("wget", [src, '-O', 'installer/neko-$suffix'], true);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ static function createNsiInstaller() {
|
|
|
|
+ if (!FileSystem.exists('installer')) {
|
|
|
|
+ FileSystem.createDirectory('installer');
|
|
|
|
+ }
|
|
|
|
+ getLatestNeko();
|
|
|
|
+ }
|
|
|
|
+
|
|
static function fileExtension(file:String) {
|
|
static function fileExtension(file:String) {
|
|
file = haxe.io.Path.withoutDirectory(file);
|
|
file = haxe.io.Path.withoutDirectory(file);
|
|
var idx = file.indexOf('.');
|
|
var idx = file.indexOf('.');
|