Skip to content
Snippets Groups Projects
Commit e23a24e4 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Update the source archive, support more non-Linux-x64 *nix builds (e.g. macOS)

parent 938dad65
No related branches found
No related tags found
No related merge requests found
Pipeline #7731 passed
...@@ -37,8 +37,12 @@ if(retval) { ...@@ -37,8 +37,12 @@ if(retval) {
} }
var platform = system.platform.toLowerCase(); var platform = system.platform.toLowerCase();
if(system.architecture=="x64") if(platform != "win32") {
platform += "-x64"; if(system.architecture=="x64")
platform += "-x64";
else
platform += ("-" + system.architecture);
}
var archive; var archive;
var archive_cmd; var archive_cmd;
var cleanup; var cleanup;
...@@ -72,7 +76,10 @@ if(platform=="win32") { ...@@ -72,7 +76,10 @@ if(platform=="win32") {
" -add -dir -max " + archive; " -add -dir -max " + archive;
cleanup="rmdir /s /q "; cleanup="rmdir /s /q ";
} else { } else {
archive="sbbs_src.tgz"; if(platform == "linux-x64")
archive = "sbbs_src.tgz";
else
archive = "sbbs_src-" + platform + ".tgz";
archive_cmd="tar --exclude=*output.txt --exclude=" + exclude_dirs.join(" --exclude=") + archive_cmd="tar --exclude=*output.txt --exclude=" + exclude_dirs.join(" --exclude=") +
" --exclude=3rdp/win32.release" + " --exclude=3rdp/win32.release" +
" --exclude-vcs" + " --exclude-vcs" +
...@@ -112,8 +119,11 @@ if(platform=="win32") { ...@@ -112,8 +119,11 @@ if(platform=="win32") {
,"> " + build_output]); ,"> " + build_output]);
} else { /* Unix */ } else { /* Unix */
builds.unshift(["src/sbbs3" ,"make GIT=yes gitinfo"]); builds.unshift(["src/sbbs3" ,"make GIT=yes gitinfo"]);
builds.push(["src/sbbs3" ,"cov-build --dir ../../cov-int make RELEASE=1 all" ,"2> " + build_output]); if(platform == "linux-x64") {
builds.push(["src/sbbs3" ,"make RELEASE=1 gtkutils" ,"2> " + build_output]); builds.push(["src/sbbs3" ,"cov-build --dir ../../cov-int make RELEASE=1 all" ,"2> " + build_output]);
builds.push(["src/sbbs3" ,"make RELEASE=1 gtkutils" ,"2> " + build_output]);
} else
builds.push(["src/sbbs3" ,"make RELEASE=1 all" ,"2> " + build_output]);
} }
var win32_dist var win32_dist
...@@ -138,9 +148,9 @@ var win32_dist ...@@ -138,9 +148,9 @@ var win32_dist
var nix_dist var nix_dist
= [ "README.TXT", = [ "README.TXT",
"FILE_ID.DIZ", "FILE_ID.DIZ",
"src/sbbs3/gcc.*.exe.release/*", "src/sbbs3/*.*.exe.release/*",
"src/sbbs3/gcc.*.lib.release/*", "src/sbbs3/*.*.lib.release/*",
"src/sbbs3/*/gcc.*.exe.release/*", "src/sbbs3/*/*.*.exe.release/*",
]; ];
chdir(temp_dir); chdir(temp_dir);
...@@ -237,10 +247,7 @@ system.exec("git checkout -b dailybuild_" + platform); ...@@ -237,10 +247,7 @@ system.exec("git checkout -b dailybuild_" + platform);
system.exec("git merge master"); system.exec("git merge master");
system.exec("git push --set-upstream origin dailybuild_" + platform); system.exec("git push --set-upstream origin dailybuild_" + platform);
var dest = file_area.dir["sbbs"].path+archive; update_file(archive);
log(LOG_INFO,format("Copying %s to %s",archive,dest));
if(!file_copy(archive,dest))
log(LOG_ERR,format("!ERROR copying %s to %s",archive,dest));
var file = new File("README.TXT"); var file = new File("README.TXT");
if(file.open("wt")) { if(file.open("wt")) {
...@@ -278,24 +285,35 @@ if(platform=="win32") { ...@@ -278,24 +285,35 @@ if(platform=="win32") {
cmd_line = "pkzip25 -add " + archive cmd_line = "pkzip25 -add " + archive
+ " -exclude=v4upgrade.exe " + win32_dist.join(" "); + " -exclude=v4upgrade.exe " + win32_dist.join(" ");
} else { } else {
cmd_line = 'tar czvf sbbs-cov.tgz cov-int && ' + if(platform == "linux-x64") {
'curl --form token=' + cov_token + ' ' + cmd_line = 'tar czvf sbbs-cov.tgz cov-int && ' +
'--form email=rob@synchro.net ' + 'curl --form token=' + cov_token + ' ' +
'--form file=@sbbs-cov.tgz ' + '--form email=rob@synchro.net ' +
'--form version=' + system.version + system.revision + ' ' + '--form file=@sbbs-cov.tgz ' +
'--form description="Synchronet for ' + system.platform + '" ' + '--form version=' + system.version + system.revision + ' ' +
'https://scan.coverity.com/builds?project=Synchronet'; '--form description="Synchronet for ' + system.platform + '" ' +
log(LOG_INFO, "Executing: " + cmd_line); 'https://scan.coverity.com/builds?project=Synchronet';
system.exec(cmd_line); log(LOG_INFO, "Executing: " + cmd_line);
archive = "sbbs_dev.tgz"; system.exec(cmd_line);
}
if(platform == "linux-x64")
archive = "sbbs_dev.tgz";
else
archive = "sbbs_dev-" + platform + ".tgz";
cmd_line = "pax -s :.*/::p -wzf " + archive + " " + nix_dist.join(" "); cmd_line = "pax -s :.*/::p -wzf " + archive + " " + nix_dist.join(" ");
} }
if(!js.terminated) { if(!js.terminated) {
log(LOG_INFO, "Executing: " + cmd_line); log(LOG_INFO, "Executing: " + cmd_line);
system.exec(cmd_line); system.exec(cmd_line);
update_file(archive);
}
bail(0);
/* end */
dest = file_area.dir["sbbs"].path+archive; function update_file(archive)
{
var dest = file_area.dir["sbbs"].path+archive;
log(LOG_INFO,format("Copying %s to %s",archive,dest)); log(LOG_INFO,format("Copying %s to %s",archive,dest));
if(!file_copy(archive,dest)) if(!file_copy(archive,dest))
...@@ -310,8 +328,6 @@ if(!js.terminated) { ...@@ -310,8 +328,6 @@ if(!js.terminated) {
} }
} }
} }
bail(0);
/* end */
function bail(code) function bail(code)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment