Add task for packaging release (#6)
* Add task for packaging release * Modify package task to package a single binary This is so it can be used as part of the build/release script. * Package release as part of Travis deploy * Set platform env var * Add arch env var * Make version available to the code * Use tar for Linux and zip for Mac & Windows
This commit is contained in:
@ -40,7 +40,8 @@ const execute = (command: string, args: string[] = [], options: cp.SpawnOptions,
|
||||
return prom;
|
||||
};
|
||||
|
||||
export type TaskFunction = (runner: Runner) => void | Promise<void>;
|
||||
// tslint:disable-next-line no-any
|
||||
export type TaskFunction = (runner: Runner, ...args: any[]) => void | Promise<void>;
|
||||
|
||||
export interface Runner {
|
||||
cwd: string;
|
||||
@ -95,7 +96,7 @@ export const run = (name: string = process.argv[2]): void | Promise<void> => {
|
||||
env: env as NodeJS.ProcessEnv,
|
||||
}, log);
|
||||
},
|
||||
});
|
||||
}, ...process.argv.slice(3));
|
||||
|
||||
if (prom) {
|
||||
activated.set(name, prom);
|
||||
|
@ -14,16 +14,17 @@ fs.writeFileSync(shimPath, shimContent);
|
||||
|
||||
const nexe = require("nexe");
|
||||
|
||||
const target = `${os.platform()}-${os.arch()}`;
|
||||
nexe.compile({
|
||||
debugBundle: true,
|
||||
input: path.join(__dirname, "../out/cli.js"),
|
||||
output: `cli-${process.env.TRAVIS_OS_NAME || os.platform()}`,
|
||||
targets: [os.platform()],
|
||||
output: `cli-${target}`,
|
||||
targets: [target],
|
||||
/**
|
||||
* To include native extensions, do NOT install node_modules for each one. They
|
||||
* are not required as each extension is built using webpack.
|
||||
*/
|
||||
resources: [
|
||||
resources: [
|
||||
path.join(__dirname, "../package.json"),
|
||||
path.join(__dirname, "../build/**/*"),
|
||||
],
|
||||
|
@ -114,7 +114,7 @@ export class Entry extends Command {
|
||||
}
|
||||
}
|
||||
|
||||
logger.info("\u001B[1mcode-server v1.0.0");
|
||||
logger.info(`\u001B[1mcode-server ${process.env.VERSION ? `v${process.env.VERSION}` : "development"}`);
|
||||
// TODO: fill in appropriate doc url
|
||||
logger.info("Additional documentation: http://github.com/codercom/code-server");
|
||||
logger.info("Initializing", field("data-dir", dataDir), field("working-dir", workingDir), field("log-dir", logDir));
|
||||
|
@ -24,7 +24,7 @@ module.exports = merge(
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
"node-pty": "node-pty-prebuilt",
|
||||
"node-pty": "node-pty-prebuilt",
|
||||
},
|
||||
},
|
||||
externals: ["tslib", "trash"],
|
||||
|
Reference in New Issue
Block a user