Skip to content

Commit e4cffb8

Browse files
committed
Merge branch 'development'
2 parents 1c0d5fa + 3e09fc6 commit e4cffb8

File tree

8 files changed

+134
-47
lines changed

8 files changed

+134
-47
lines changed

.cfformat.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@
1717
"function_call.multiline.leading_comma.padding": true,
1818
"function_call.casing.builtin": "cfdocs",
1919
"function_call.casing.userdefined": "camel",
20-
"function_call.multiline.element_count": 3,
20+
"function_call.multiline.element_count": 2,
2121
"function_call.multiline.leading_comma": false,
2222
"function_call.multiline.min_length": 40,
2323
"function_declaration.padding": true,
2424
"function_declaration.empty_padding": false,
2525
"function_declaration.multiline.leading_comma": false,
2626
"function_declaration.multiline.leading_comma.padding": true,
27-
"function_declaration.multiline.element_count": 3,
27+
"function_declaration.multiline.element_count": 2,
2828
"function_declaration.multiline.min_length": 40,
2929
"function_declaration.group_to_block_spacing": "compact",
3030
"function_anonymous.empty_padding": false,
3131
"function_anonymous.group_to_block_spacing": "compact",
32-
"function_anonymous.multiline.element_count": 3,
32+
"function_anonymous.multiline.element_count": 2,
3333
"function_anonymous.multiline.leading_comma": false,
3434
"function_anonymous.multiline.leading_comma.padding": true,
3535
"function_anonymous.multiline.min_length": 40,
@@ -44,6 +44,8 @@
4444
"max_columns": 120,
4545
"metadata.multiline.element_count": 3,
4646
"metadata.multiline.min_length": 40,
47+
"method_call.chain.multiline" : 3,
48+
"newline":"\n",
4749
"property.multiline.element_count": 3,
4850
"property.multiline.min_length": 40,
4951
"parentheses.padding": true,

.travis.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ install:
5858
- box config set endpoints.forgebox.APIToken=$FORGEBOX_API_TOKEN > /dev/null
5959

6060
script:
61-
# Set Current Version
61+
# Set Current Version and Travis Tag
6262
- TARGET_VERSION=`cat $TRAVIS_BUILD_DIR/box.json | jq '.version' -r`
63+
- TRAVIS_TAG=${TARGET_VERSION}
6364
- echo "Starting build for ${MODULE_ID} v${TARGET_VERSION}"
6465
# Replace version so builder can issue it
6566
@@ -78,7 +79,7 @@ script:
7879
# Build Project
7980
- box task run taskfile=build/Build target=run :version=${TARGET_VERSION} :projectName=${MODULE_ID} :buildID=${TRAVIS_BUILD_NUMBER} :branch=${TRAVIS_BRANCH}
8081
# Cat results for debugging
81-
- cat build/results.json
82+
#- cat build/results.json
8283

8384
after_failure:
8485
- cd $TRAVIS_BUILD_DIR/test-harness
@@ -121,9 +122,26 @@ deploy:
121122
upload-dir: coldbox-modules/$MODULE_ID/$TARGET_VERSION
122123
acl: public_read
123124

125+
# Github Release only on Master
126+
- provider: releases
127+
api_key: ${GITHUB_TOKEN}
128+
on:
129+
branch:
130+
- master
131+
condition: "$ENGINE = lucee@5"
132+
skip_cleanup: true
133+
edge: true
134+
file_glob: true
135+
file: $TRAVIS_BUILD_DIR/.artifacts/$MODULE_ID/**/*
136+
release_notes_file: changelog-latest.md
137+
name: v${TRAVIS_TAG}
138+
tag_name: v${TRAVIS_TAG}
139+
overwrite: true
140+
141+
# Once API Docs and Binaries are deployed to S3 Publish to ForgeBox
124142
after_deploy:
125143
# Move to build out artifact
126144
- cd ${TRAVIS_BUILD_DIR}/.tmp/${MODULE_ID}
127145
- cat box.json
128-
# Only publish once
146+
# Only publish once using the lucee matrix
129147
- if [ ${ENGINE} = 'lucee@5' ]; then box forgebox publish; fi

box.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name":"ColdBox Security",
3-
"version":"2.5.0",
3+
"version":"2.6.0",
44
"location":"https://downloads.ortussolutions.com/ortussolutions/coldbox-modules/cbsecurity/@build.version@/[email protected]@.zip",
55
"author":"Ortus Solutions.com <[email protected]>",
66
"slug":"cbsecurity",
@@ -33,9 +33,9 @@
3333
"cbcsrf":"^2.0.0"
3434
},
3535
"scripts":{
36-
"toMaster":"recipe build/toMaster.boxr",
36+
"release":"recipe build/release.boxr",
3737
"format":"cfformat run handlers/,interceptors/,models/,test-harness/tests/specs",
38-
"format:watch":"cfformat watch handlers/,interceptors/,models/,test-harness/tests/specs",
38+
"format:watch":"cfformat watch handlers/,interceptors/,models/,test-harness/tests/specs ./.cfformat.json",
3939
"format:check":"cfformat check handlers/,interceptors/,models/,test-harness/tests/specs"
4040
}
4141
}

build/Build.cfc

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,18 @@ component{
7070
docs( argumentCollection=arguments );
7171

7272
// checksums
73-
buildChecksums();
73+
buildChecksums();
74+
75+
// Build latest changelog
76+
latestChangelog();
7477

7578
// Finalize Message
7679
print.line()
7780
.boldMagentaLine( "Build Process is done! Enjoy your build!" )
7881
.toConsole();
7982
}
8083

81-
/**
84+
/**
8285
* Run the test suites
8386
*/
8487
function runTests(){
@@ -177,11 +180,10 @@ component{
177180

178181
command( 'docbox generate' )
179182
.params(
180-
"mappings:interceptors" = "interceptors",
181-
"mappings:interfaces" = "interfaces",
182-
"mappings:models" = "models",
183+
"source" = "models",
184+
"mapping" = "models",
183185
"strategy-projectTitle" = "#arguments.projectName# v#arguments.version#",
184-
"strategy-outputDir" = arguments.outputDir
186+
"strategy-outputDir" = arguments.outputDir
185187
)
186188
.run();
187189

@@ -196,7 +198,28 @@ component{
196198
overwrite=true,
197199
recurse=true
198200
);
199-
}
201+
}
202+
203+
/**
204+
* Build the latest changelog file: changelog-latest.md
205+
*/
206+
function latestChangelog(){
207+
print.blueLine( "Building latest changelog..." ).toConsole();
208+
209+
if( !fileExists( variables.cwd & "changelog.md" ) ){
210+
return error( "Cannot continue building, changelog.md file doesn't exist!" );
211+
}
212+
213+
fileWrite(
214+
variables.cwd & "changelog-latest.md",
215+
fileRead( variables.cwd & 'changelog.md' ).split( '----' )[2].trim() & chr( 13 ) & chr( 10 )
216+
);
217+
218+
print
219+
.greenLine( "Latest changelog file created at `changelog-latest.md`" )
220+
.line()
221+
.line( fileRead( variables.cwd & "changelog-latest.md" ) );
222+
}
200223

201224
/********************************************* PRIVATE HELPERS *********************************************/
202225

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,25 @@
11
# This recipe signifies a new release of the module by doing merges and bumps accordingly
22

3-
# Check out master
3+
# Check out master and update it locally
44
!git checkout -f master
5-
!git pull
6-
# Merge development into it
5+
!git pull origin master
6+
7+
# Merge development into it for release
78
!git merge --no-ff development
8-
# Tag the master repo with the version in box.json
9+
10+
# Tag the master repo with the version from box.json
911
!git tag v`box package show version`
10-
# Push all branches
12+
13+
# Push all branches back out to github
1114
!git push origin --all
15+
1216
# Push all tags
1317
!git push origin --tags
18+
1419
# Check development again
1520
!git checkout -f development
21+
1622
# Bump to prepare for a new release, do minor, change if needed and don't tag
1723
bump --minor --!tagVersion
18-
# Send it out
1924
!git commit -a -m "version bump"
2025
!git push origin development

changelog.md

Lines changed: 49 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,54 @@
1-
# CHANGELOG
1+
# Changelog
22

3-
## 2.5.0
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
----
9+
10+
## [2.6.0] => 2020-JUL-22
11+
12+
### Added
13+
14+
* New build layout based on new module layout
15+
* Auto github publishing release notes
16+
* More formatting goodness and watcher
17+
18+
### Fixed
19+
20+
* JWT Validator now passing `permissions` instead of `roles`
21+
* Token Storage checking was being done even if disabled
22+
23+
24+
----
25+
26+
## [2.5.0] => 2020-APR-03
427

528
* `Feature` : Upgraded to `cbAuth` @ 5.x
629

7-
## 2.4.0
30+
----
31+
32+
## [2.4.0] => 2020-APR-02
833

934
* `Feature` : We now include the `cbcsrf` module to allow for protections of cross site request forgery vectors. Please see all the features included in this module here: https://github.com/coldbox-modules/cbcsrf
1035

11-
## 2.3.0
36+
----
37+
38+
## [2.3.0] => 2020-MAR-30
1239

1340
* `Feature` Introduction of the cbSecurity model: https://coldbox-security.ortusbooks.com/intro/release-history/whats-new-with-2.3.0
1441
* `Task` : Cfformatting everywhere
1542

16-
## 2.2.1
43+
----
44+
45+
## [2.2.1] => 2020-FEB-26
1746

1847
* `bug` : `verify` should pass `verify=true` into the jwt library for proper verification
1948

20-
## 2.2.0
49+
----
50+
51+
## [2.2.0] => 2020-FEB-12
2152

2253
* `Feature` : Migrated from the jwt to the `jwtcfml` (https://forgebox.io/view/jwt-cfml) library to expand encoding/decoding capabilities to support `RS` and `ES` algorithms:
2354
* HS256
@@ -37,11 +68,15 @@
3768
* `Improve` : More cfformating goodness!
3869
* `Bug` : Invalidation of tokens was not happening due to not using the actual key for the storage
3970

40-
## 2.1.0
71+
----
72+
73+
## [2.1.0] => 2019-OCT-02
4174

4275
* `Feature` : cbauth upgraded to version 4
4376

44-
## 2.0.0
77+
----
78+
79+
## [2.0.0] => 2019-SEP-25
4580

4681
### New Features
4782

@@ -118,33 +153,33 @@ settings = {
118153
* If the `filepath` has `json` or `xml` in it, we will use that as the source style
119154
* `rulesFile` removed you can now use the `rules` setting.
120155

121-
## 1.3.0
156+
## [1.3.0]
122157

123158
* Travis integration
124159
* DocBox updates
125160
* Build process updates
126161

127-
## 1.2.0
162+
## [1.2.0]
128163

129164
* Updated documentation
130165
* Updated doc references
131166
* New docs build process
132167
* Update root builder dependencies
133168

134-
## 1.1.0
169+
## [1.1.0]
135170

136171
* Updated documentation
137172
* Ability for interceptor to auto-register via new `cbsecurity` settings in master config.
138173

139-
## 1.0.2
174+
## [1.0.2]
140175

141176
* Removed `getPlugin()` deprecated calls to new approach.
142177
* https://ortussolutions.atlassian.net/browse/CCM-26 cbsecurity ocm rules not ColdBox 4 compat
143178

144-
## 1.0.1
179+
## [1.0.1]
145180

146181
* Fixed missing `$throw()` method to native `throw()` method.
147182

148-
## 1.0.0
183+
## [1.0.0]
149184

150185
* Created first module version

0 commit comments

Comments
 (0)