Skip to content

Commit

Permalink
Merge branch 'development' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
lmajano committed Sep 9, 2020
2 parents f7a8d89 + cb5b56e commit 17e976b
Show file tree
Hide file tree
Showing 12 changed files with 211 additions and 125 deletions.
112 changes: 60 additions & 52 deletions .cfformat.json
Original file line number Diff line number Diff line change
@@ -1,54 +1,62 @@
{
"array.empty_padding" : false,
"array.padding" : true,
"array.multiline.min_length" : 40,
"array.multiline.element_count" : 4,
"array.multiline.leading_comma.padding" : true,
"array.multiline.leading_comma" : false,
"assignments.consecutive.alignment" : true,
"brackets.padding" : true,
"comment.asterisks" : "align",
"binary_operators.padding" : true,
"for_loop_semicolons.padding" : true,
"function_call.empty_padding" : false,
"function_call.padding" : true,
"function_call.multiline.leading_comma.padding" : true,
"function_call.casing.builtin" : "cfdocs",
"function_call.casing.userdefined" : "",
"function_call.multiline.element_count" : 4,
"function_call.multiline.leading_comma" : false,
"function_call.multiline.min_length" : 40,
"function_declaration.padding" : true,
"function_declaration.empty_padding" : false,
"function_declaration.multiline.leading_comma" : false,
"function_declaration.multiline.leading_comma.padding" : true,
"function_declaration.multiline.element_count" : 4,
"function_declaration.multiline.min_length" : 40,
"function_declaration.group_to_block_spacing" : "compact",
"function_anonymous.empty_padding" : false,
"function_anonymous.group_to_block_spacing" : "compact",
"function_anonymous.multiline.element_count" : 4,
"function_anonymous.multiline.leading_comma" : false,
"function_anonymous.multiline.leading_comma.padding" : true,
"function_anonymous.multiline.min_length" : 40,
"function_anonymous.padding" : false,
"indent_size" : 4,
"keywords.block_to_keyword_spacing" : "spaced",
"keywords.group_to_block_spacing" : "spaced",
"keywords.padding_inside_group" : true,
"keywords.spacing_to_block" : "spaced",
"keywords.spacing_to_group" : true,
"keywords.empty_group_spacing" : false,
"max_columns" : 120,
"parentheses.padding" : true,
"strings.quote" : "double",
"strings.attributes.quote" : "double",
"struct.separator" : " : ",
"struct.padding" : true,
"struct.empty_padding" : false,
"struct.multiline.leading_comma" : false,
"struct.multiline.leading_comma.padding" : true,
"struct.multiline.element_count" : 4,
"struct.multiline.min_length" : 40,
"tab_indent" : true
"array.empty_padding": false,
"array.padding": true,
"array.multiline.min_length": 40,
"array.multiline.element_count": 2,
"array.multiline.leading_comma.padding": true,
"array.multiline.leading_comma": false,
"alignment.consecutive.assignments": true,
"alignment.consecutive.properties": true,
"alignment.consecutive.params": true,
"brackets.padding": true,
"comment.asterisks": "align",
"binary_operators.padding": true,
"for_loop_semicolons.padding": true,
"function_call.empty_padding": false,
"function_call.padding": true,
"function_call.multiline.leading_comma.padding": true,
"function_call.casing.builtin": "cfdocs",
"function_call.casing.userdefined": "camel",
"function_call.multiline.element_count": 2,
"function_call.multiline.leading_comma": false,
"function_call.multiline.min_length": 40,
"function_declaration.padding": true,
"function_declaration.empty_padding": false,
"function_declaration.multiline.leading_comma": false,
"function_declaration.multiline.leading_comma.padding": true,
"function_declaration.multiline.element_count": 2,
"function_declaration.multiline.min_length": 40,
"function_declaration.group_to_block_spacing": "compact",
"function_anonymous.empty_padding": false,
"function_anonymous.group_to_block_spacing": "compact",
"function_anonymous.multiline.element_count": 2,
"function_anonymous.multiline.leading_comma": false,
"function_anonymous.multiline.leading_comma.padding": true,
"function_anonymous.multiline.min_length": 40,
"function_anonymous.padding": true,
"indent_size": 4,
"keywords.block_to_keyword_spacing": "spaced",
"keywords.group_to_block_spacing": "spaced",
"keywords.padding_inside_group": true,
"keywords.spacing_to_block": "spaced",
"keywords.spacing_to_group": true,
"keywords.empty_group_spacing": false,
"max_columns": 120,
"metadata.multiline.element_count": 3,
"metadata.multiline.min_length": 40,
"method_call.chain.multiline": 3,
"newline": "\n",
"property.multiline.element_count": 3,
"property.multiline.min_length": 40,
"parentheses.padding": true,
"strings.quote": "double",
"strings.attributes.quote": "double",
"struct.separator": " : ",
"struct.padding": true,
"struct.empty_padding": false,
"struct.multiline.leading_comma": false,
"struct.multiline.leading_comma.padding": true,
"struct.multiline.element_count": 2,
"struct.multiline.min_length": 40,
"tab_indent": true
}
23 changes: 20 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ install:
script:
# Set Current Version
- TARGET_VERSION=`cat $TRAVIS_BUILD_DIR/box.json | jq '.version' -r`
- TRAVIS_TAG=${TARGET_VERSION}
- echo "Starting build for ${MODULE_ID} v${TARGET_VERSION}"
# Replace version so builder can issue it
- box package set version=@build.version@+@build.number@
Expand All @@ -49,16 +50,16 @@ script:
- box install
# run our matrix server
- box server start serverConfigFile="server-${ENGINE}.json"
# Startup the app
# Startup the app: Uncomment if needed
#- curl http://localhost:60299
# Debugging of tests
#- curl http://localhost:60299/tests/runner.cfm?reporter=json -o testresults.json && cat testresults.json
# move back to build dir to build it
- cd $TRAVIS_BUILD_DIR
# Build Project
- box task run taskfile=build/Build target=run :version=${TARGET_VERSION} :projectName=${MODULE_ID} :buildID=${TRAVIS_BUILD_NUMBER} :branch=${TRAVIS_BRANCH}
# Cat results for debugging
- cat build/results.json
# Cat results for debugging: Uncomment if needed
#- cat build/results.json

after_failure:
- cd $TRAVIS_BUILD_DIR/test-harness
Expand Down Expand Up @@ -101,6 +102,22 @@ deploy:
upload-dir: coldbox-modules/$MODULE_ID/$TARGET_VERSION
acl: public_read

# Github Release only on Master
- provider: releases
api_key: ${GITHUB_TOKEN}
on:
branch:
- master
condition: "$ENGINE = lucee@5"
skip_cleanup: true
edge: true
file_glob: true
file: $TRAVIS_BUILD_DIR/.artifacts/$MODULE_ID/**/*
release_notes_file: changelog-latest.md
name: v${TRAVIS_TAG}
tag_name: v${TRAVIS_TAG}
overwrite: true

after_deploy:
# Move to build out artifact
- cd ${TRAVIS_BUILD_DIR}/.tmp/${MODULE_ID}
Expand Down
11 changes: 7 additions & 4 deletions box.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name":"ColdBox Relax",
"author":"Ortus Solutions <info@ortussolutions.com>",
"version":"4.1.0",
"version":"4.1.1",
"slug":"relax",
"type":"modules",
"keywords":"RESTFul,modeling,web services",
Expand Down Expand Up @@ -35,12 +35,15 @@
"**/.*",
"tests"
],
"scripts":{
"toMaster":"recipe build/toMaster.boxr"
},
"installPaths":{
"cbjavaloader":"modules/cbjavaloader/",
"cbSwagger":"modules/cbSwagger/",
"wikitext":"modules/wikitext/"
},
"scripts": {
"release": "recipe build/release.boxr",
"format": "cfformat run config/,handlers/,interceptors/,models/,test-harness/tests/specs",
"format:watch": "cfformat watch config/,handlers/,interceptors/,models/,test-harness/tests/specs ./.cfformat.json",
"format:check": "cfformat check config/,handlers/,interceptors/,models/,test-harness/tests/specs"
}
}
46 changes: 32 additions & 14 deletions build/Build.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ component{

// Source Excludes Not Added to final binary
variables.excludes = [
".vscode",
".editorconfig",
".vscode",
".editorconfig",
".gitignore",
".travis.yml",
".artifacts",
".tmp",
".DS_Store",
".git",
".gitattributes",
"build",
"modules",
"build",
"modules",
"node_modules",
"resources",
"test-harness",
Expand All @@ -39,7 +39,6 @@ component{
"webpack.config.js",
".cfformat.json",
".cflintrc"

];

// Cleanup + Init Build Directories
Expand Down Expand Up @@ -85,15 +84,18 @@ component{
docs( argumentCollection=arguments );

// checksums
buildChecksums();
buildChecksums();

// Build latest changelog
latestChangelog();

// Finalize Message
print.line()
.boldMagentaLine( "Build Process is done! Enjoy your build!" )
.toConsole();
}

/**
/**
* Run the test suites
*/
function runTests(){
Expand Down Expand Up @@ -187,12 +189,7 @@ component{
*/
function docs( required projectName, version="1.0.0", outputDir=".tmp/apidocs" ){
// Generate Docs
print.greenLine( "Generating API Docs, please wait..." ).toConsole();

if( directoryExists( arguments.outputDir ) ){
directoryDelete( arguments.outputDir, true );
}

print.greenLine( "Generating API Docs, please wait..." ).toConsole();
directoryCreate( arguments.outputDir, true, true );

command( 'docbox generate' )
Expand All @@ -215,7 +212,28 @@ component{
overwrite=true,
recurse=true
);
}
}

/**
* Build the latest changelog file: changelog-latest.md
*/
function latestChangelog(){
print.blueLine( "Building latest changelog..." ).toConsole();

if( !fileExists( variables.cwd & "changelog.md" ) ){
return error( "Cannot continue building, changelog.md file doesn't exist!" );
}

fileWrite(
variables.cwd & "changelog-latest.md",
fileRead( variables.cwd & 'changelog.md' ).split( '----' )[2].trim() & chr( 13 ) & chr( 10 )
);

print
.greenLine( "Latest changelog file created at `changelog-latest.md`" )
.line()
.line( fileRead( variables.cwd & "changelog-latest.md" ) );
}

/********************************************* PRIVATE HELPERS *********************************************/

Expand Down
16 changes: 11 additions & 5 deletions build/toMaster.boxr → build/release.boxr
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
# This recipe signifies a new release of the module by doing merges and bumps accordingly

# Check out master
# Check out master and update it locally
!git checkout -f master
# Merge development into it
!git pull origin master

# Merge development into it for release
!git merge --no-ff development
# Tag the master repo with the version in box.json

# Tag the master repo with the version from box.json
!git tag v`box package show version`
# Push all branches

# Push all branches back out to github
!git push origin --all

# Push all tags
!git push origin --tags

# Check development again
!git checkout -f development

# Bump to prepare for a new release, do minor, change if needed and don't tag
bump --minor --!tagVersion
# Send it out
!git commit -a -m "version bump"
!git push origin development
Loading

0 comments on commit 17e976b

Please sign in to comment.