1+ [tasks .print_outs ]
2+ script_runner = " @duckscript"
3+ script = '''
4+ echo "BREAKER: ${BREAKER}"
5+ echo "winodows would be args: "FROM:: ${FOLDER_BIN_EXE}""
6+ echo "winodows would be args: "TO:: ${DIST_FOLDER}/${OUTPUT_BIN_NAME}.exe""
7+ echo "BREAKER: ${BREAKER}"
8+ '''
9+
110[tasks .clear_dist_if_exist ]
2- windows.command = " del"
311command = " rm"
4- windows.args = [" ${DIST_FOLDER}/" , " -ErrorAction" , " SilentlyContinue" ]
5- # windows.args = ["-Force", "-Recurse", "${DIST_FOLDER}/", "-ErrorAction", "SilentlyContinue"]
612linux.args = [" -rf" , " ${DIST_FOLDER}/" ]
13+ windows.command = " pwsh.exe"
14+ windows.args = [
15+ " -Command" ,
16+ " Remove-Item" ,
17+ " -Recurse" ,
18+ " -Force" ,
19+ " ${DIST_FOLDER}/" ,
20+ " -ErrorAction" ,
21+ " SilentlyContinue"
22+ ]
23+ ignore_errors = true # REQUIRED as - if the dir doesn't exist, SilenlyContinue does nothing really
724
825[tasks .create_dist ]
9- windows.command = " mkdir"
1026linux.command = " mkdir"
11- windows.args = [" ${DIST_FOLDER}/" ]
1227linux.args = [" -p" , " ${DIST_FOLDER}/" ]
28+ windows.command = " mkdir"
29+ windows.args = [" ${DIST_FOLDER}/" ]
1330
1431[tasks .create_showcase_dist ]
1532linux.command = " mkdir"
33+ linux.args = [" -p" , " ${DIST_FOLDER}/showcase/" ]
1634windows.command = " mkdir"
17- args = [" -p " , " ${DIST_FOLDER}/showcase/" ]
35+ windows. args = [" ${DIST_FOLDER}/showcase/" ]
1836dependencies = [" create_dist" ]
1937
2038[tasks .copy_readme_to_dist ]
2139linux.command = " cp"
22- windows.command = " copy"
23- args = [" ${ROOT}/README.md" , " ${DIST_FOLDER}/" ]
40+ linux.args = [" ${ROOT}/README.md" , " ${DIST_FOLDER}/" ]
41+ windows.command = " pwsh.exe"
42+ windows.args = [
43+ " -Command" ,
44+ " Copy-Item" ,
45+ " -Path" ,
46+ " ${ROOT}/README.md" ,
47+ " -Destination" ,
48+ " ${DIST_FOLDER}" ,
49+ ]
2450dependencies = [" create_dist" ]
2551
2652[tasks .copy_release_to_dist ]
27- command = " cp"
28- windows.args = [" ${FOLDER_BIN_EXE}" , " ${DIST_FOLDER}/${OUTPUT_BIN_NAME}.exe" ]
53+ linux.command = " cp"
2954linux.args = [" ${FOLDER_BIN_EXE}" , " ${DIST_FOLDER}/${OUTPUT_BIN_NAME}" ]
30- dependencies = [" create_dist" , " build_release" ]
55+ windows.command = " pwsh.exe"
56+ windows.args = [
57+ " -Command" ,
58+ " Copy-Item" ,
59+ " -Path" ,
60+ " ${FOLDER_BIN_EXE}" ,
61+ " -Destination" ,
62+ " ${DIST_FOLDER}/${OUTPUT_BIN_NAME}.exe" ,
63+ ]
64+ dependencies = [" create_dist" ]
65+
66+ [tasks .compress_dist ]
67+ linux.command = " tar"
68+ linux.args = [
69+ " -czvf" ,
70+ " ${DIST_FOLDER}.tar.gz" ,
71+ " ${DIST_FOLDER}/" ,
72+ " mv" ,
73+ " ${DIST_FOLDER}.tar.gz" ,
74+ " ${DIST_FOLDER}/" ,
75+ ]
76+
77+ windows.command = " pwsh.exe"
78+ windows.args = [
79+ " -Command" ,
80+ " Compress-Archive" ,
81+ " -Path" ,
82+ " ${DIST_FOLDER}" ,
83+ " -DestinationPath" ,
84+ " ${DIST_FOLDER}.zip" ,
85+ ]
86+ dependencies = [" create_dist" ]
87+
88+ [tasks .move_compressed_to_dist ]
89+ linux.command = " mv"
90+ linux.args = [" ${DIST_FOLDER}.tar.gz" , " ${DIST_FOLDER}/" ]
91+
92+ windows.command = " pwsh.exe"
93+ windows.args = [
94+ " -Command" ,
95+ " Move-Item" ,
96+ " -Path" ,
97+ " ${DIST_FOLDER}.zip" ,
98+ " -Destination" ,
99+ " ${DIST_FOLDER}/"
100+ ]
101+
102+ # Lets any streaming tasks finish
103+ [tasks .sleep ]
104+ linux.command = " sleep"
105+ linux.args = [" 1" ]
106+ windows.command = " pwsh.exe"
107+ windows.args = [" -Command" , " Start-Sleep" , " -Seconds" , " 1" ]
108+
109+ [tasks .gitignore_folder_contents ]
110+ linux.command = " echo"
111+ linux.args = [" \" *\" >> ${DIST_FOLDER}/.gitignore" ]
112+
113+ windows.command = " pwsh.exe"
114+ windows.args = [
115+ " -Command" ,
116+ " echo" ,
117+ " \" *\" " ,
118+ " >>" ,
119+ " ${DIST_FOLDER}/.gitignore"
120+ ]
31121
32122[tasks .build_release_dist ]
123+ env.PROFILE = " release"
33124dependencies = [
34- # "a",
125+ " a" ,
126+ " clear_dist_if_exist" ,
35127 " create_dist" ,
36- # "create_showcase_dist",
37- # "copy_readme_to_dist",
38- # "copy_release_to_dist",
39- # "print_all",
40- # "docs",
41- ]
128+ " create_showcase_dist" ,
129+ " copy_readme_to_dist" ,
130+ " copy_release_to_dist" ,
131+ " docs" ,
132+ " print_all" ,
133+ " gitignore_folder_contents" ,
134+ " compress_dist" ,
135+ " sleep" ,
136+ " move_compressed_to_dist" ,
137+ ]
0 commit comments