mirror of
https://github.com/arx-research/libhalo.git
synced 2026-01-10 05:38:10 -05:00
25 lines
795 B
JavaScript
25 lines
795 B
JavaScript
const {ArgumentParser} = require("argparse");
|
|
const {doFixWinBinary} = require("./win_fix_binary");
|
|
const {parseGitHubRef, getProductInfo} = require("./version_helper");
|
|
const {writeFileSync} = require("fs");
|
|
|
|
async function runCIScripts() {
|
|
const parser = new ArgumentParser({
|
|
description: "GitHub Actions CI Entrypoint"
|
|
});
|
|
|
|
parser.add_argument("--platform", {required: true});
|
|
parser.add_argument("--product", {required: true});
|
|
let args = parser.parse_args();
|
|
|
|
if (args.platform.includes("windows")) {
|
|
await doFixWinBinary(args.product);
|
|
}
|
|
|
|
let productInfo = getProductInfo(args.product);
|
|
let versionInfo = parseGitHubRef();
|
|
writeFileSync('halotools_version.json', JSON.stringify({...productInfo, ...versionInfo}));
|
|
}
|
|
|
|
runCIScripts();
|