diff --git a/.onedev-buildspec.yml b/.onedev-buildspec.yml index 2d82459..e1baf9e 100644 --- a/.onedev-buildspec.yml +++ b/.onedev-buildspec.yml @@ -52,6 +52,20 @@ jobs: userName: '@job_token@' passwordSecret: dockersecret condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL + - !CommandStep + name: push to coolify + runInContainer: true + image: curlimages/curl:latest + interpreter: !DefaultInterpreter + commands: | + curl "$COOLIFY_WEBHOOK" -H "Authorization: Bearer $COOLIFY_TOKEN" + envVars: + - name: COOLIFY_WEBHOOK + value: '@secret:COOLIFY_WEBHOOK@' + - name: COOLIFY_TOKEN + value: '@secret:COOLIFY_TOKEN@' + useTTY: true + condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL triggers: - !DependencyFinishedTrigger projects: crosslang diff --git a/Templates/compiletool/cross.json b/Templates/compiletool/cross.json index 5b69738..7ab38ad 100644 --- a/Templates/compiletool/cross.json +++ b/Templates/compiletool/cross.json @@ -11,6 +11,7 @@ "template_info": { "type": "compile_tool" }, + "template_name_pretty": "Compile Tool", "template_ignored_files": ["bin","obj"], "description": "A tool that can be a dependency to a project (including libraries) that runs at compile time" } diff --git a/Templates/console/cross.json b/Templates/console/cross.json index dda2c32..4705dd9 100644 --- a/Templates/console/cross.json +++ b/Templates/console/cross.json @@ -11,6 +11,7 @@ "template_info": { "type": "console" }, + "template_name_pretty": "Console Application", "template_ignored_files": ["bin","obj"], "description": "A console application" } diff --git a/Templates/emptyweb/cross.json b/Templates/emptyweb/cross.json index 966ac81..74480bb 100644 --- a/Templates/emptyweb/cross.json +++ b/Templates/emptyweb/cross.json @@ -12,6 +12,7 @@ "template_info": { "type": "console" }, + "template_name_pretty": "Empty Website", "template_extra_text_ftles": [], "template_ignored_files": ["bin","obj"] } diff --git a/Templates/gui/res/layout.json b/Templates/gui/res/layout.json deleted file mode 100644 index eea4a62..0000000 --- a/Templates/gui/res/layout.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "Child": { - "Type": "AbsoluteView", - "Items": [ - { - "Bounds": { - "X": 42, - "Y": 42, - "Width": 200, - "Height": 50 - }, - "Type": "ButtonView", - "Text": "Click Me", - "Id": "btn1", - "Active": true - } - ] - }, - "Palette": { - "IsDarkMode": true, - "Accent": "#DB0", - "Border": "#040", - "BorderActive":"#A00", - "BorderHover": "#00A", - "BorderHoverActive": "#A0A", - "FontSize": 20 - }, - "Size": { - "Width": 640, - "Height": 480 - }, - "Text": "%PROJECT_NAME%" -} \ No newline at end of file diff --git a/Templates/gui/src/main.tcross b/Templates/gui/src/main.tcross deleted file mode 100644 index 87c79a2..0000000 --- a/Templates/gui/src/main.tcross +++ /dev/null @@ -1,18 +0,0 @@ -func btn1_Click(sender,e) -{ - Console.WriteLine("Button Clicked"); -} -func main(args) -{ - if(TypeOf(GUI) != "Dictionary") - { - Console.WriteLine("The GUI is not supported, please build tessesframework with TESSESFRAMEWORK_ENABLE_SDL2."); - return 1; - } - var window = GUI.Window.FromJSON(embed("layout.json"), SDL2.Window.Resizable); - var btn1 = window.FindViewById("btn1"); - btn1.Click += btn1_Click; - VM.RunEventLoop(); - btn.Click -= btn1_Click; - window.Dispose(); //we need to destroy it or it will leak -} diff --git a/Templates/lib/cross.json b/Templates/lib/cross.json index 6b53ba4..98f6a7b 100644 --- a/Templates/lib/cross.json +++ b/Templates/lib/cross.json @@ -12,6 +12,7 @@ "type": "lib" }, "template_ignored_files": ["bin","obj"], - "description": "A crosslang library" + "description": "A crosslang library", + "template_name_pretty": "Library" } } diff --git a/Templates/template/cross.json b/Templates/template/cross.json index d54dd42..396f9bb 100644 --- a/Templates/template/cross.json +++ b/Templates/template/cross.json @@ -21,6 +21,7 @@ }, "template_project_dependencies": [], "template_extra_text_ftles": [], - "template_ignored_files": ["bin","obj"] + "template_ignored_files": ["bin","obj"], + "template_name_pretty": "Template" } } diff --git a/Templates/tool/cross.json b/Templates/tool/cross.json index f08dd13..5a6ef1f 100644 --- a/Templates/tool/cross.json +++ b/Templates/tool/cross.json @@ -21,5 +21,6 @@ "license": "MIT" }, "version": "1.0.0.0-prod", - "name": "Tesses.CrossLang.Template.Tool" + "name": "Tesses.CrossLang.Template.Tool", + "template_name_pretty": "Tool" } \ No newline at end of file diff --git a/Templates/web/cross.json b/Templates/web/cross.json index 6125543..cedcdbc 100644 --- a/Templates/web/cross.json +++ b/Templates/web/cross.json @@ -13,5 +13,6 @@ "type": "console" }, "template_ignored_files": ["bin","obj"] - } + }, + "template_name_pretty": "WebSite" } diff --git a/Templates/gui/.crossarchiveignore b/Templates/webapp/.crossarchiveignore similarity index 100% rename from Templates/gui/.crossarchiveignore rename to Templates/webapp/.crossarchiveignore diff --git a/Templates/gui/cross.json b/Templates/webapp/cross.json similarity index 62% rename from Templates/gui/cross.json rename to Templates/webapp/cross.json index ba81d53..2f7c987 100644 --- a/Templates/gui/cross.json +++ b/Templates/webapp/cross.json @@ -2,25 +2,24 @@ "dependencies": [ ], "info": { - "template_extra_text_ftles": [ - "res/layout.json" - ], + "template_ignored_files": [ "bin", "obj" ], "template_info": { - "type": "app", + "type": "webapp", "license": "MIT" }, - "template_name": "gui", + "template_name": "webapp", + "template_name_pretty": "Web Application", "template_project_dependencies": [ ], "repo": "https://onedev.site.tesses.net/CrossLang/CrossLangExtras", "homepage": "https://crosslang.tesseslanguage.com/", "type": "template", - "description": "A crosslang gui, using tesses-framework's gui library" + "description": "A web app (for webview or eventual cloud OS)" }, - "name": "Tesses.CrossLang.Template.GUI", + "name": "Tesses.CrossLang.Template.WebApp", "version": "1.0.0.0-prod" } \ No newline at end of file diff --git a/Templates/webapp/src/main.tcross b/Templates/webapp/src/main.tcross new file mode 100644 index 0000000..7570b76 --- /dev/null +++ b/Templates/webapp/src/main.tcross @@ -0,0 +1,12 @@ + +func WebAppMain(args) +{ + return (ctx)=>{ + if(ctx.Path == "/") + { + ctx.WithMimeType("text/html").SendText(