Skip to content

Commit 4a30ff3

Browse files
committed
adding transpilation instead of compilation, until we fix some issues in our sourceless deployment
1 parent 8513c05 commit 4a30ff3

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ jobs:
5050

5151
- name: Setup BoxLang
5252
uses: ortus-boxlang/setup-boxlang@1.1.0
53+
with:
54+
version: "snapshot"
5355

5456
- name: Setup CommandBox
5557
uses: Ortus-Solutions/setup-commandbox@v2.0.1

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ tests/automation/results
1414
tests/automation/results-*
1515
tests/logs
1616
tests/suites/loadtests/settings.xml
17+
tests/bxtest/**
1718
logs/*
1819

1920
# Build artifacts

build/Build.cfc

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ component {
2828
variables.libraries = {
2929
"bx-coldbox" : {
3030
"standalone" : false,
31-
"compile": true,
31+
"transpile" : true,
32+
// Don't compile until we fix a few sourceless deployment issues
33+
"compile": false,
3234
"apidocs" : false,
3335
"readme" : "readme.md",
3436
"boxjson" : "build/resources/box-boxlang.json",
@@ -39,6 +41,7 @@ component {
3941
},
4042
"coldbox" : {
4143
"standalone" : false,
44+
"transpile" : false,
4245
"compile": false,
4346
"apidocs" : true,
4447
"readme" : "readme.md",
@@ -47,6 +50,7 @@ component {
4750
},
4851
"cachebox" : {
4952
"standalone" : true,
53+
"transpile" : false,
5054
"compile": false,
5155
"apidocs" : true,
5256
"readme" : "system/cache/readme.md",
@@ -60,6 +64,7 @@ component {
6064
},
6165
"logbox" : {
6266
"standalone" : true,
67+
"transpile" : false,
6368
"compile": false,
6469
"apidocs" : true,
6570
"readme" : "system/logging/readme.md",
@@ -72,6 +77,7 @@ component {
7277
},
7378
"wirebox" : {
7479
"standalone" : true,
80+
"transpile" : false,
7581
"compile": false,
7682
"apidocs" : true,
7783
"readme" : "system/ioc/readme.md",
@@ -318,12 +324,27 @@ component {
318324

319325
// Do we compile?
320326
if( libRecord.compile ){
321-
print.greenLine( "Compiling source code ..." ).toConsole();
327+
print.greenLine( "🤖 Compiling source code to byte code ..." ).toConsole();
322328
command( "run" )
323329
.params( "boxlang compile --source #libBuildDir# --target #libBuildDir#" )
324330
.run()
325331
}
326332

333+
// Do we transpile?
334+
if( libRecord.transpile ){
335+
print.greenLine( "💫 Transpiling CFML to BoxLang ..." ).toConsole();
336+
command( "run" )
337+
.params( "boxlang cftranspile --verbose --source #libBuildDir# --target #libBuildDir#" )
338+
.run()
339+
// Remove now all the cfc, cfm files in the libBuildDir
340+
directoryList( libBuildDir, true, "path", ( path ) => {
341+
return listFindNoCase( "cfc,cfm", listLast( path, "." ) );
342+
} ).each( ( item ) => {
343+
print.blueLine( "🥊 Deleting Source File [#item#]" ).toConsole();
344+
fileDelete( item );
345+
} );
346+
}
347+
327348
// Zip Bundle
328349
print.greenLine( "Zipping code to [#libArtifactDir#]..." ).toConsole();
329350
cfzip(

0 commit comments

Comments
 (0)