Skip to content

Commit

Permalink
more fixes and updates for build processes now in commandbox
Browse files Browse the repository at this point in the history
  • Loading branch information
lmajano committed Sep 27, 2023
1 parent c270312 commit 40e8f6d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
- name: Run Tests
run: |
box task run build/Build.cf runTests
box run-script tests
- name: Set cfengine version env
run: echo "CFENGINE_VERSION=$(box echo ${serverInfo.engineName@coldbox-${{ matrix.cfengine }}}@${serverInfo.engineVersion@coldbox-${{ matrix.cfengine }}})" >> $GITHUB_ENV
Expand Down
3 changes: 3 additions & 0 deletions box.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
},
"scripts":{
"release":"recipe build/release.boxr",
"tests": "task run build/Build.cfc runTests",
"apidocs" : "task run build/Build.cfc buildDocs",
"build": "task run build/Build.cfc run :docs=false",
"format":"cfformat run system/**/*.cfc,tests/specs/**/*.cfc --overwrite",
"format:watch":"cfformat watch system/**/*.cfc,tests/specs/**/*.cfc ./.cfformat.json",
"format:check":"cfformat check system/**/*.cfc,tests/specs/**/*.cfc ./.cfformat.json",
Expand Down
37 changes: 26 additions & 11 deletions build/Build.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,23 @@ component {
* @version The version you are building
* @buldID The build identifier
* @branch The branch you are building
* @docs Whether to build the docs or not
* @tests Whether to run the tests or not
*/
function run(
version = "1.0.0",
buildID = createUUID(),
branch = "development"
branch = "development",
boolean docs = true,
boolean tests = false
){
// Build the source distributions
variables.libraries.each( ( lib ) => {
print
variables.print
.line()
.line( "************************************************************" )
.boldMagentaLine( "Building Source For [#arguments.lib#]..." )
.line( "************************************************************" )
.blueLine( "************************************************************" )
.boldBlueLine( "< Building Source For [#arguments.lib#] >" )
.blueLine( "************************************************************" )
.toConsole()
buildSource(
library: arguments.lib,
Expand All @@ -115,13 +119,22 @@ component {
);
} );

// Build The Docs
buildDocs( argumentCollection = arguments );
// Build the API Docs
if( arguments.docs ){
buildDocs( argumentCollection = arguments );
}

// RUn tests
if( arguments.tests ){
runTests();
}

// Finalize Message
print
variables.print
.line()
.boldMagentaLine( "Build Process is done! Enjoy your build!" )
.greenLine( "************************************************************" )
.boldGreenLine( "√ Build Process is done, enjoy your build!" )
.greenLine( "************************************************************" )
.toConsole();
}

Expand Down Expand Up @@ -294,8 +307,10 @@ component {
"root=#urlEncodedFormat( variables.buildDir & "/dist/" )#";

variables.print
.blueLine( "Building the [#arguments.library#] api docs, please wait..." )
.line( "Doc Url: #docsUrl#" )
.blueLine( "************************************************************" )
.boldBlueLine( "Building the [#arguments.library#] api docs, please wait..." )
.line( "+ Doc Url: #docsUrl#" )
.blueLine( "************************************************************" )
.line()
.toConsole();

Expand Down

0 comments on commit 40e8f6d

Please sign in to comment.