mirror of
				https://github.com/JonasKruckenberg/tauri-build.git
				synced 2025-10-31 09:13:55 +00:00 
			
		
		
		
	replace execa with standard exec
This commit is contained in:
		
							parent
							
								
									2ba8a7ea2c
								
							
						
					
					
						commit
						0c030cb57d
					
				| @ -3,7 +3,6 @@ | |||||||
|   "version": "0.1.2-beta.3", |   "version": "0.1.2-beta.3", | ||||||
|   "description": "TypeScript template action", |   "description": "TypeScript template action", | ||||||
|   "main": "lib/main.js", |   "main": "lib/main.js", | ||||||
|   "type": "module", |  | ||||||
|   "scripts": { |   "scripts": { | ||||||
|     "build": "tsc", |     "build": "tsc", | ||||||
|     "format": "prettier --write '**/*.ts'", |     "format": "prettier --write '**/*.ts'", | ||||||
| @ -26,7 +25,6 @@ | |||||||
|   "dependencies": { |   "dependencies": { | ||||||
|     "@actions/core": "^1.6.0", |     "@actions/core": "^1.6.0", | ||||||
|     "@tauri-apps/cli": "1.0.0-rc.10", |     "@tauri-apps/cli": "1.0.0-rc.10", | ||||||
|     "execa": "^6.1.0", |  | ||||||
|     "string-argv": "^0.3.1", |     "string-argv": "^0.3.1", | ||||||
|     "tiny-glob": "^0.2.9", |     "tiny-glob": "^0.2.9", | ||||||
|     "@tauri-apps/cli-win32-x64-msvc": "1.0.0-rc.10", |     "@tauri-apps/cli-win32-x64-msvc": "1.0.0-rc.10", | ||||||
|  | |||||||
							
								
								
									
										75
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										75
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							| @ -11,7 +11,6 @@ specifiers: | |||||||
|   '@vercel/ncc': 0.33.4 |   '@vercel/ncc': 0.33.4 | ||||||
|   eslint: 8.15.0 |   eslint: 8.15.0 | ||||||
|   eslint-plugin-github: 4.3.6 |   eslint-plugin-github: 4.3.6 | ||||||
|   execa: ^6.1.0 |  | ||||||
|   js-yaml: 4.1.0 |   js-yaml: 4.1.0 | ||||||
|   prettier: 2.6.2 |   prettier: 2.6.2 | ||||||
|   string-argv: ^0.3.1 |   string-argv: ^0.3.1 | ||||||
| @ -24,7 +23,6 @@ dependencies: | |||||||
|   '@tauri-apps/cli-darwin-x64': 1.0.0-rc.10 |   '@tauri-apps/cli-darwin-x64': 1.0.0-rc.10 | ||||||
|   '@tauri-apps/cli-linux-x64-gnu': 1.0.0-rc.10 |   '@tauri-apps/cli-linux-x64-gnu': 1.0.0-rc.10 | ||||||
|   '@tauri-apps/cli-win32-x64-msvc': 1.0.0-rc.10 |   '@tauri-apps/cli-win32-x64-msvc': 1.0.0-rc.10 | ||||||
|   execa: 6.1.0 |  | ||||||
|   string-argv: 0.3.1 |   string-argv: 0.3.1 | ||||||
|   tiny-glob: 0.2.9 |   tiny-glob: 0.2.9 | ||||||
| 
 | 
 | ||||||
| @ -483,6 +481,7 @@ packages: | |||||||
|       path-key: 3.1.1 |       path-key: 3.1.1 | ||||||
|       shebang-command: 2.0.0 |       shebang-command: 2.0.0 | ||||||
|       which: 2.0.2 |       which: 2.0.2 | ||||||
|  |     dev: true | ||||||
| 
 | 
 | ||||||
|   /debug/2.6.9: |   /debug/2.6.9: | ||||||
|     resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} |     resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} | ||||||
| @ -901,21 +900,6 @@ packages: | |||||||
|     engines: {node: '>=0.10.0'} |     engines: {node: '>=0.10.0'} | ||||||
|     dev: true |     dev: true | ||||||
| 
 | 
 | ||||||
|   /execa/6.1.0: |  | ||||||
|     resolution: {integrity: sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA==} |  | ||||||
|     engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} |  | ||||||
|     dependencies: |  | ||||||
|       cross-spawn: 7.0.3 |  | ||||||
|       get-stream: 6.0.1 |  | ||||||
|       human-signals: 3.0.1 |  | ||||||
|       is-stream: 3.0.0 |  | ||||||
|       merge-stream: 2.0.0 |  | ||||||
|       npm-run-path: 5.1.0 |  | ||||||
|       onetime: 6.0.0 |  | ||||||
|       signal-exit: 3.0.7 |  | ||||||
|       strip-final-newline: 3.0.0 |  | ||||||
|     dev: false |  | ||||||
| 
 |  | ||||||
|   /fast-deep-equal/3.1.3: |   /fast-deep-equal/3.1.3: | ||||||
|     resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} |     resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} | ||||||
|     dev: true |     dev: true | ||||||
| @ -1016,11 +1000,6 @@ packages: | |||||||
|       has-symbols: 1.0.3 |       has-symbols: 1.0.3 | ||||||
|     dev: true |     dev: true | ||||||
| 
 | 
 | ||||||
|   /get-stream/6.0.1: |  | ||||||
|     resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} |  | ||||||
|     engines: {node: '>=10'} |  | ||||||
|     dev: false |  | ||||||
| 
 |  | ||||||
|   /get-symbol-description/1.0.0: |   /get-symbol-description/1.0.0: | ||||||
|     resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} |     resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} | ||||||
|     engines: {node: '>= 0.4'} |     engines: {node: '>= 0.4'} | ||||||
| @ -1115,11 +1094,6 @@ packages: | |||||||
|       function-bind: 1.1.1 |       function-bind: 1.1.1 | ||||||
|     dev: true |     dev: true | ||||||
| 
 | 
 | ||||||
|   /human-signals/3.0.1: |  | ||||||
|     resolution: {integrity: sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ==} |  | ||||||
|     engines: {node: '>=12.20.0'} |  | ||||||
|     dev: false |  | ||||||
| 
 |  | ||||||
|   /ignore/5.2.0: |   /ignore/5.2.0: | ||||||
|     resolution: {integrity: sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==} |     resolution: {integrity: sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==} | ||||||
|     engines: {node: '>= 4'} |     engines: {node: '>= 4'} | ||||||
| @ -1233,11 +1207,6 @@ packages: | |||||||
|       call-bind: 1.0.2 |       call-bind: 1.0.2 | ||||||
|     dev: true |     dev: true | ||||||
| 
 | 
 | ||||||
|   /is-stream/3.0.0: |  | ||||||
|     resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} |  | ||||||
|     engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} |  | ||||||
|     dev: false |  | ||||||
| 
 |  | ||||||
|   /is-string/1.0.7: |   /is-string/1.0.7: | ||||||
|     resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} |     resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} | ||||||
|     engines: {node: '>= 0.4'} |     engines: {node: '>= 0.4'} | ||||||
| @ -1260,6 +1229,7 @@ packages: | |||||||
| 
 | 
 | ||||||
|   /isexe/2.0.0: |   /isexe/2.0.0: | ||||||
|     resolution: {integrity: sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=} |     resolution: {integrity: sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=} | ||||||
|  |     dev: true | ||||||
| 
 | 
 | ||||||
|   /js-yaml/4.1.0: |   /js-yaml/4.1.0: | ||||||
|     resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} |     resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} | ||||||
| @ -1326,10 +1296,6 @@ packages: | |||||||
|       yallist: 4.0.0 |       yallist: 4.0.0 | ||||||
|     dev: true |     dev: true | ||||||
| 
 | 
 | ||||||
|   /merge-stream/2.0.0: |  | ||||||
|     resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} |  | ||||||
|     dev: false |  | ||||||
| 
 |  | ||||||
|   /merge2/1.4.1: |   /merge2/1.4.1: | ||||||
|     resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} |     resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} | ||||||
|     engines: {node: '>= 8'} |     engines: {node: '>= 8'} | ||||||
| @ -1343,11 +1309,6 @@ packages: | |||||||
|       picomatch: 2.3.1 |       picomatch: 2.3.1 | ||||||
|     dev: true |     dev: true | ||||||
| 
 | 
 | ||||||
|   /mimic-fn/4.0.0: |  | ||||||
|     resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} |  | ||||||
|     engines: {node: '>=12'} |  | ||||||
|     dev: false |  | ||||||
| 
 |  | ||||||
|   /minimatch/3.1.2: |   /minimatch/3.1.2: | ||||||
|     resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} |     resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} | ||||||
|     dependencies: |     dependencies: | ||||||
| @ -1378,13 +1339,6 @@ packages: | |||||||
|     resolution: {integrity: sha512-gbMzqQtTtDz/00jQzZ21PQzdI9PyLYqUSvD0p3naOhX4odFji0ZxYdnVwPTxmSwkmxhcFImpozceidSG+AgoPQ==} |     resolution: {integrity: sha512-gbMzqQtTtDz/00jQzZ21PQzdI9PyLYqUSvD0p3naOhX4odFji0ZxYdnVwPTxmSwkmxhcFImpozceidSG+AgoPQ==} | ||||||
|     dev: true |     dev: true | ||||||
| 
 | 
 | ||||||
|   /npm-run-path/5.1.0: |  | ||||||
|     resolution: {integrity: sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==} |  | ||||||
|     engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} |  | ||||||
|     dependencies: |  | ||||||
|       path-key: 4.0.0 |  | ||||||
|     dev: false |  | ||||||
| 
 |  | ||||||
|   /object-inspect/1.12.0: |   /object-inspect/1.12.0: | ||||||
|     resolution: {integrity: sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==} |     resolution: {integrity: sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==} | ||||||
|     dev: true |     dev: true | ||||||
| @ -1419,13 +1373,6 @@ packages: | |||||||
|       wrappy: 1.0.2 |       wrappy: 1.0.2 | ||||||
|     dev: true |     dev: true | ||||||
| 
 | 
 | ||||||
|   /onetime/6.0.0: |  | ||||||
|     resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} |  | ||||||
|     engines: {node: '>=12'} |  | ||||||
|     dependencies: |  | ||||||
|       mimic-fn: 4.0.0 |  | ||||||
|     dev: false |  | ||||||
| 
 |  | ||||||
|   /optionator/0.9.1: |   /optionator/0.9.1: | ||||||
|     resolution: {integrity: sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==} |     resolution: {integrity: sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==} | ||||||
|     engines: {node: '>= 0.8.0'} |     engines: {node: '>= 0.8.0'} | ||||||
| @ -1477,11 +1424,7 @@ packages: | |||||||
|   /path-key/3.1.1: |   /path-key/3.1.1: | ||||||
|     resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} |     resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} | ||||||
|     engines: {node: '>=8'} |     engines: {node: '>=8'} | ||||||
| 
 |     dev: true | ||||||
|   /path-key/4.0.0: |  | ||||||
|     resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} |  | ||||||
|     engines: {node: '>=12'} |  | ||||||
|     dev: false |  | ||||||
| 
 | 
 | ||||||
|   /path-parse/1.0.7: |   /path-parse/1.0.7: | ||||||
|     resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} |     resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} | ||||||
| @ -1587,10 +1530,12 @@ packages: | |||||||
|     engines: {node: '>=8'} |     engines: {node: '>=8'} | ||||||
|     dependencies: |     dependencies: | ||||||
|       shebang-regex: 3.0.0 |       shebang-regex: 3.0.0 | ||||||
|  |     dev: true | ||||||
| 
 | 
 | ||||||
|   /shebang-regex/3.0.0: |   /shebang-regex/3.0.0: | ||||||
|     resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} |     resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} | ||||||
|     engines: {node: '>=8'} |     engines: {node: '>=8'} | ||||||
|  |     dev: true | ||||||
| 
 | 
 | ||||||
|   /side-channel/1.0.4: |   /side-channel/1.0.4: | ||||||
|     resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} |     resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} | ||||||
| @ -1600,10 +1545,6 @@ packages: | |||||||
|       object-inspect: 1.12.0 |       object-inspect: 1.12.0 | ||||||
|     dev: true |     dev: true | ||||||
| 
 | 
 | ||||||
|   /signal-exit/3.0.7: |  | ||||||
|     resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} |  | ||||||
|     dev: false |  | ||||||
| 
 |  | ||||||
|   /slash/3.0.0: |   /slash/3.0.0: | ||||||
|     resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} |     resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} | ||||||
|     engines: {node: '>=8'} |     engines: {node: '>=8'} | ||||||
| @ -1642,11 +1583,6 @@ packages: | |||||||
|     engines: {node: '>=4'} |     engines: {node: '>=4'} | ||||||
|     dev: true |     dev: true | ||||||
| 
 | 
 | ||||||
|   /strip-final-newline/3.0.0: |  | ||||||
|     resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} |  | ||||||
|     engines: {node: '>=12'} |  | ||||||
|     dev: false |  | ||||||
| 
 |  | ||||||
|   /strip-json-comments/3.1.1: |   /strip-json-comments/3.1.1: | ||||||
|     resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} |     resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} | ||||||
|     engines: {node: '>=8'} |     engines: {node: '>=8'} | ||||||
| @ -1767,6 +1703,7 @@ packages: | |||||||
|     hasBin: true |     hasBin: true | ||||||
|     dependencies: |     dependencies: | ||||||
|       isexe: 2.0.0 |       isexe: 2.0.0 | ||||||
|  |     dev: true | ||||||
| 
 | 
 | ||||||
|   /word-wrap/1.2.3: |   /word-wrap/1.2.3: | ||||||
|     resolution: {integrity: sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==} |     resolution: {integrity: sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==} | ||||||
|  | |||||||
| @ -1,7 +1,8 @@ | |||||||
| import { run } from '@tauri-apps/cli' | import { run } from '@tauri-apps/cli' | ||||||
| import {execa} from 'execa' | import {join, resolve} from 'path' | ||||||
| import {join} from 'path' |  | ||||||
| import glob from 'tiny-glob' | import glob from 'tiny-glob' | ||||||
|  | import * as core from '@actions/core' | ||||||
|  | import { spawn } from 'child_process' | ||||||
| 
 | 
 | ||||||
| interface BuildOptions { | interface BuildOptions { | ||||||
|   runner?: string |   runner?: string | ||||||
| @ -24,12 +25,16 @@ export async function buildProject(options: BuildOptions): Promise<string[]> { | |||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   if (options.projectPath) { |   if (options.projectPath) { | ||||||
|     process.chdir(options.projectPath) |     const newCwd = resolve(process.cwd(), options.projectPath) | ||||||
|  |     core.debug(`changing working directory: ${process.cwd()} -> ${newCwd}`) | ||||||
|  |     process.chdir(newCwd) | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   if (options.runner) { |   if (options.runner) { | ||||||
|     await execa(options.runner, ['build', ...args], { stdio: 'inherit' }) |     core.info(`running ${options.runner} with args: build ${args.join(' ')}`) | ||||||
|  |     await execRunnerCmd(options.runner, ['build', ...args]) | ||||||
|   } else { |   } else { | ||||||
|  |     core.info(`running builtin runner with args: build ${args.join(' ')}`) | ||||||
|     await run(['build', ...args], '') |     await run(['build', ...args], '') | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
| @ -47,7 +52,29 @@ export async function buildProject(options: BuildOptions): Promise<string[]> { | |||||||
|   ] |   ] | ||||||
|   const windowsExts = ['msi', 'msi.zip', 'msi.zip.sig'] |   const windowsExts = ['msi', 'msi.zip', 'msi.zip.sig'] | ||||||
| 
 | 
 | ||||||
|   return glob( |   const artifactsLookupPattern = join(outDir, `*/*.{${[...macOSExts, linuxExts, windowsExts].join(',')}}`) | ||||||
|     join(outDir, `*/*.{${[...macOSExts, linuxExts, windowsExts].join(',')}}`) | 
 | ||||||
|   ) |   core.debug(`Looking for artifacts using this pattern: ${artifactsLookupPattern}`) | ||||||
|  | 
 | ||||||
|  |   return glob(artifactsLookupPattern) | ||||||
| } | } | ||||||
|  | 
 | ||||||
|  | async function execRunnerCmd(runner: string, args: string[]) { | ||||||
|  |   return new Promise((resolve, reject) => { | ||||||
|  |     const child = spawn(runner, args, { stdio: 'inherit', shell: true }) | ||||||
|  | 
 | ||||||
|  |     child.on('exit', (exitCode, signal) => { | ||||||
|  |       resolve({exitCode, signal}); | ||||||
|  |     }); | ||||||
|  |    | ||||||
|  |     child.on('error', error => { | ||||||
|  |       reject(error); | ||||||
|  |     }); | ||||||
|  |    | ||||||
|  |     if (child.stdin) { | ||||||
|  |       child.stdin.on('error', error => { | ||||||
|  |         reject(error); | ||||||
|  |       }); | ||||||
|  |     } | ||||||
|  |   }) | ||||||
|  | } | ||||||
| @ -1,7 +1,7 @@ | |||||||
| { | { | ||||||
|   "compilerOptions": { |   "compilerOptions": { | ||||||
|     "target": "es6",                          /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ |     "target": "es6",                          /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ | ||||||
|     "module": "esnext",                       /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ |     "module": "commonjs",                     /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ | ||||||
|     "outDir": "./lib",                        /* Redirect output structure to the directory. */ |     "outDir": "./lib",                        /* Redirect output structure to the directory. */ | ||||||
|     "rootDir": "./src",                       /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ |     "rootDir": "./src",                       /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ | ||||||
|     "strict": true,                           /* Enable all strict type-checking options. */ |     "strict": true,                           /* Enable all strict type-checking options. */ | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user