Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
lmajano committed Nov 6, 2020
2 parents f0fcdbf + e692794 commit e94b084
Show file tree
Hide file tree
Showing 14 changed files with 397 additions and 115 deletions.
75 changes: 54 additions & 21 deletions .cfformat.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,62 @@
{
"brackets.padding": true,
"strings.quote": "double",
"strings.attributes.quote": "double",
"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_declaration.padding": true,
"function_call.padding": true,
"function_call.multiline.leading_comma.padding": true,
"function_declaration.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.padding" : true,
"array.empty_padding":false,
"array.padding":true,
"array.multiline.leading_comma.padding":true,
"binary_operators.padding":true,
"for_loop_semicolons.padding":true,
"indent_size":4,
"parentheses.padding":true,
"struct.separator":" : ",
"tab_indent":true,
"keywords.block_to_keyword_spacing" : "spaced",
"keywords.group_to_block_spacing" : "spaced",
"keywords.padding_inside_group" : true,
"keywords.spacing_to_block" : "compact",
"keywords.spacing_to_group" : true
"struct.multiline.leading_comma": false,
"struct.multiline.leading_comma.padding": true,
"struct.multiline.element_count": 2,
"struct.multiline.min_length": 40,
"tab_indent": true
}
19 changes: 18 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,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 @@ -79,7 +80,7 @@ script:
# 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 build/results.json

after_failure:
- cd $TRAVIS_BUILD_DIR/test-harness
Expand Down Expand Up @@ -122,6 +123,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: $TRAVIS_BUILD_DIR/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
7 changes: 5 additions & 2 deletions box.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name":"Mementifier : The State Maker!",
"version":"2.1.0",
"version":"2.2.0",
"location":"https://downloads.ortussolutions.com/ortussolutions/coldbox-modules/mementifier/@build.version@/mementifier-@build.version@.zip",
"author":"Ortus Solutions, Corp",
"homepage":"https://github.com/coldbox-modules/mementifier",
Expand Down Expand Up @@ -30,6 +30,9 @@
"*/.md"
],
"scripts":{
"toMaster":"recipe build/toMaster.boxr"
"release":"recipe build/release.boxr",
"format":"cfformat run interceptors/,models/,test-harness/handlers,test-harness/tests/specs",
"format:watch":"cfformat watch interceptors/,models/,test-harness/handlers,test-harness/tests/specs ./.cfformat.json",
"format:check":"cfformat check interceptors/,models/,test-harness/handlers,test-harness/tests/specs"
}
}
36 changes: 31 additions & 5 deletions build/Build.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ component{
buildID=createUUID(),
branch="development"
){
// Create project mapping
fileSystemUtil.createMapping( arguments.projectName, variables.cwd );

// Run the tests
runTests();
Expand All @@ -68,15 +70,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 @@ -175,8 +180,8 @@ component{

command( 'docbox generate' )
.params(
"source" = "interceptors",
"mapping" = "interceptors",
"source" = "models",
"mapping" = "models",
"strategy-projectTitle" = "#arguments.projectName# v#arguments.version#",
"strategy-outputDir" = arguments.outputDir
)
Expand All @@ -193,7 +198,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
17 changes: 11 additions & 6 deletions build/toMaster.boxr → build/release.boxr
Original file line number Diff line number Diff line change
@@ -1,20 +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
!git pull
# 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
77 changes: 62 additions & 15 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,32 @@
# Changelog

## 2.1.0
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

----

## [2.2.0] => 2020-NOV-05

### Added

* Allow defaults to be `null` thanks to @elpete
* Updated changelog to new keepachangelog.com standards
* Added new release recipe according to new module template
* Added new formating rules
* Added github auto publishing on releases

----

## [2.1.0] => 2020-MAR-10

* `Feature` : Enabled mappers to be called after memento was finalized in order to allow you to build composite properties and non-existent properties on the memento
* `Feature` : New setting `trustedGetters` to allow you to leverage virtual `getters()` especially on frameworks like Quick. This setting can also be used in the `getMemento()` calls directly or setup in an entity definition.

## 2.0.0
----

## [2.0.0] => 2020-JAN-22

### Features

Expand All @@ -23,57 +44,83 @@
* Removed ACF 11 Support
* ORM Auto includes only marshalls properties instead of everything.

## v1.9.0
----

## [1.9.0]

* More Adobe ColdFusion incompatibilities

## v1.8.0
----

## [1.8.0]

* Added the `ResultsMapper` model which will create results map a-la cffractal. Just inject and call via the `process()` method.

## v1.7.1
----

## [1.7.1]

* ACF11 Compats

## v1.7.0
----

## [1.7.0]

* Allow for `defaultIncludes = [ "*" ]` to introspect the properties of the object automatically instead of writing all properties manually.

## v1.6.0
----

## [1.6.0]

* Allow for arrays of complex objects that don't have mementos
* ACF11 Incompats due to member functions

## v1.5.0
----

## [1.5.0]

* Only process memento based objects from WireBox.

## v1.4.1
----

## [1.4.1]

* Wrong date formatting pattern for Java SimpleDateFormat

## v1.4.0
----

## [1.4.0]

* New setting: `ormAutoIncludes` which defaults to `true`. If enabled, and an ORM entity does not have any includes defined, we will automatically include all ORM properties including relationships.

## v1.3.0
----

## [1.3.0]

* ACF Incompatibilities
* Ensure result item

## v1.1.1
----

## [1.1.1]

* Fixes on non-existent properties

## v1.1.0
----

## [1.1.0]

* Major performance boosts
* Lucee issues with degradation over time

## v1.0.1
----

## [1.0.1]

* Fix on WireBox target detection

## v1.0.0
----

## [1.0.0]

* First iteration of this module
Loading

0 comments on commit e94b084

Please sign in to comment.