mirror of
https://onedev.site.tesses.net/crosslang/crosslangextras
synced 2026-02-08 17:15:45 +00:00
Package server docker container
This commit is contained in:
48
Tesses.CrossLang.Shell/src/build.tcross
Normal file
48
Tesses.CrossLang.Shell/src/build.tcross
Normal file
@@ -0,0 +1,48 @@
|
||||
func Tesses.CrossLang.Shell.Build(dd)
|
||||
{
|
||||
var offline=false;
|
||||
var allowFullCompTime=false;
|
||||
var buildPath = ".";
|
||||
if(dd.Arguments.Count > 1)
|
||||
{
|
||||
buildPath = dd.Arguments[1];
|
||||
}
|
||||
each(var flag : dd.Flags)
|
||||
{
|
||||
if(flag == "offline")
|
||||
{
|
||||
offline = true;
|
||||
}
|
||||
if(flag == "allow-insecure-comptime")
|
||||
{
|
||||
allowFullCompTime=true;
|
||||
}
|
||||
if(flag == "help")
|
||||
{
|
||||
Console.WriteLine("USAGE: crosslang build [build-flags-and-options]");
|
||||
Console.WriteLine("FLAGS:");
|
||||
Console.WriteLine("offline: build with no internet (don't fetch files)");
|
||||
Console.WriteLine("help: this help");
|
||||
Console.WriteLine("allow-insecure-comptime: Allow full comptime");
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("OPTIONS:");
|
||||
Console.WriteLine("conf=CONFIGSTRING: specify a conf string for compile_tool(s), is the property Config");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
var conf = "";
|
||||
each(var option : dd.Options)
|
||||
{
|
||||
if(option.Key == "conf")
|
||||
{
|
||||
conf = option.Value;
|
||||
}
|
||||
}
|
||||
var pm = Tesses.CrossLang.PackageManager();
|
||||
pm.Offline = offline;
|
||||
var bt = Tesses.CrossLang.BuildTool(pm);
|
||||
bt.Config = conf;
|
||||
bt.AllowFullCompTime = allowFullCompTime;
|
||||
bt.BuildProject(buildPath);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user