From a73235da847f8ab78783b1bf6fd6a630daeb0d87 Mon Sep 17 00:00:00 2001 From: Michael Born Date: Thu, 3 Aug 2023 06:14:09 -0400 Subject: [PATCH 01/11] version bump --- box.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/box.json b/box.json index ac21d78..e66232a 100644 --- a/box.json +++ b/box.json @@ -1,6 +1,6 @@ { "name":"DocBox", - "version":"3.1.0", + "version":"3.2.0", "author":"Ortus Solutions, Corp", "location":"http://downloads.ortussolutions.com/ortussolutions/docbox/@build.version@/docbox-@build.version@.zip", "homepage":"https://forgebox.io/view/docbox", From 4409df222e4286ee03da05aa48f35c8a3fc21a92 Mon Sep 17 00:00:00 2001 From: Michael Born Date: Thu, 3 Aug 2023 06:18:08 -0400 Subject: [PATCH 02/11] version bump --- box.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/box.json b/box.json index e66232a..a47fc4c 100644 --- a/box.json +++ b/box.json @@ -1,6 +1,6 @@ { "name":"DocBox", - "version":"3.2.0", + "version":"3.3.0", "author":"Ortus Solutions, Corp", "location":"http://downloads.ortussolutions.com/ortussolutions/docbox/@build.version@/docbox-@build.version@.zip", "homepage":"https://forgebox.io/view/docbox", @@ -14,7 +14,7 @@ "shortDescription":"CFC API Documentation generator for ColdFusion (CFML) using JavaDoc conventions", "type":"projects", "keywords":"apidocs, coldfusion docs, javadocs, cfc docs", - "organization": "ortus-solutions", + "organization":"ortus-solutions", "license":[ { "type":"Apache2", From 60f2787fb32ef373cdb6935a43832f4505c2c113 Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Tue, 13 Feb 2024 11:51:58 +0100 Subject: [PATCH 03/11] - Adobe 2023 Testing and Support - New Github Actions - New supporting files --- .cfformat.json | 2 +- .cflintrc | 2 +- .gitattributes | 5 -- .markdownlint.json | 1 + .travis.yml | 111 ----------------------------------------- box.json | 7 ++- changelog.md | 39 +++++++++------ server-adobe@2023.json | 21 ++++++++ 8 files changed, 54 insertions(+), 134 deletions(-) delete mode 100644 .travis.yml create mode 100644 server-adobe@2023.json diff --git a/.cfformat.json b/.cfformat.json index 0233515..5c04917 100644 --- a/.cfformat.json +++ b/.cfformat.json @@ -59,4 +59,4 @@ "struct.multiline.element_count": 2, "struct.multiline.min_length": 40, "tab_indent": true -} \ No newline at end of file +} diff --git a/.cflintrc b/.cflintrc index fbe418e..b392d05 100644 --- a/.cflintrc +++ b/.cflintrc @@ -59,4 +59,4 @@ "parameters": { "TooManyFunctionsChecker.maximum" : 20 } -} \ No newline at end of file +} diff --git a/.gitattributes b/.gitattributes index 412eeda..bdb0cab 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,11 +3,6 @@ # Custom for Visual Studio *.cs diff=csharp -*.sln merge=union -*.csproj merge=union -*.vbproj merge=union -*.fsproj merge=union -*.dbproj merge=union # Standard to msysgit *.doc diff=astextplain diff --git a/.markdownlint.json b/.markdownlint.json index 3707fcb..21bc843 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -11,5 +11,6 @@ "no-duplicate-header" : { "siblings_only" : true }, + "no-duplicate-heading" : false, "no-inline-html" : false } diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a3ab2fb..0000000 --- a/.travis.yml +++ /dev/null @@ -1,111 +0,0 @@ -language: java - -notifications: - slack: - secure: FIHlTn/YO7Wgumm1uIqmoEsqjQA7fV0AE94Rjc5yKzM3AquQa8HicgDVVk0d2GrKRnl0xt3j4ZJV//VJyIjlCd/QVKuj48R2ChjEY2im3+99HFPafCUI5/S2uyowKU6mJTFonH9v6p41eqxdbiAxJdDGOT0V2Gpt3UBSNuHz8ED9/aIHqv+P7M+VD6Xd2XYwctPniWlaSWx57sWcnG/VkFG45qFQAyha64uxOOe4M3ZmG/n5FfauZ8cBVLiRKEIr+CyNhh1ujfzi7+4uzMlSNL5t/BbZamAQuZzqGzGQ9RVvIlyPgUGNJtDEE/hWS09aagXF5T6EMj00szizErh4J1/x4qZwml5+TcBN31E0QmAhCtZe85sr3tYgic+hEz9XX1yymQzf/C7n4to2yNvq0r4g51xDk8IuP95WEh7zaqLlvFZvBFgxpHZBMYlRvhytjOYDeIFRMcGwHZcXosaG2ejqDwcGq/LC4oeG4sSwmg9sdRrtcmcanrNqrBka86WYO6LntI3JdZ86/1ACEUHzhCCwvrKELc9Ji1xxGAgS7QKH+s2/hnJuiMyv73gOVLKYC+wPMLt+fvOmPLSEl+PJiAIlToBq1KUBg03RSQLfPOLD7OrJ8VvDZsEPwejqlGDyc4wRglS9OTi7SnN5LYHSDNDdGdREegWqq9qDHEYEVLI= - -env: - # Fill out these global variables for build process - matrix: - - ENGINE=lucee@5 - - ENGINE=adobe@2016 - - ENGINE=adobe@2018 - -branches: - only: - - development - - master - -sudo: required -dist: xenial - -before_install: -# CommandBox Keys - - curl -fsSl https://downloads.ortussolutions.com/debs/gpg | sudo apt-key add - - - sudo echo "deb https://downloads.ortussolutions.com/debs/noarch /" | sudo tee -a - /etc/apt/sources.list.d/commandbox.list - -install: - # Install Commandbox - - sudo apt-get update && sudo apt-get --assume-yes install jq commandbox - # Install CommandBox Supporting Librarires - - box install commandbox-cfconfig,commandbox-dotenv - # If using auto-publish, you will need to provide your API token with this line: - - box config set endpoints.forgebox.APIToken=$FORGEBOX_API_TOKEN > /dev/null - -script: - # Set Current Version and Travis Tag - - TARGET_VERSION=`cat $TRAVIS_BUILD_DIR/box.json | jq '.version' -r` - - TRAVIS_TAG=${TARGET_VERSION} - - echo "Starting build for DocBox v${TARGET_VERSION}" - # Replace version so builder can issue it - - box package set version=@build.version@+@build.number@ - # run our dependency install to ensure the workbench is in place - - box install - # run our matrix server - - box server start serverConfigFile="server-${ENGINE}.json" - # Build Project - - box task run taskfile=build/Build target=run :version=${TARGET_VERSION} :buildID=${TRAVIS_BUILD_NUMBER} :branch=${TRAVIS_BRANCH} - -after_failure: - - cd $TRAVIS_BUILD_DIR - # Display the contents of our root directory - # Spit out our Commandbox log in case we need to debug - - box server log server-${ENGINE}.json - - cat `box system-log` - -deploy: - # Binary Deployments - - provider: s3 - on: - branch: - - master - - development - #condition: "$ENGINE = lucee@4.5" - skip_cleanup: true - #AWS Credentials need to be set in Travis - access_key_id: $AWS_ACCESS_KEY - secret_access_key: $AWS_ACCESS_SECRET - bucket: "downloads.ortussolutions.com" - local-dir: $TRAVIS_BUILD_DIR/.artifacts/docbox - upload-dir: ortussolutions/docbox - acl: public_read - - #API Docs Deployment - - provider: s3 - on: - branch: - - master - - development - #condition: "$ENGINE = lucee@4.5" - skip_cleanup: true - #AWS Credentials need to be set in Travis - access_key_id: $AWS_ACCESS_KEY - secret_access_key: $AWS_ACCESS_SECRET - bucket: "apidocs.ortussolutions.com" - local-dir: $TRAVIS_BUILD_DIR/tests/apidocs - upload-dir: docbox/$BUILD_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/docbox/**/* - 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/docbox - - cat box.json - # Only publish once using the lucee matrix - - if [ ${ENGINE} = 'lucee@5' ]; then box forgebox publish; fi diff --git a/box.json b/box.json index a47fc4c..ab48a72 100644 --- a/box.json +++ b/box.json @@ -24,7 +24,10 @@ "contributors":[ "Brad Wood " ], - "dependencies":{}, + "dependencies":{ + "commandbox-cfformat":"*", + "commandbox-docbox":"*" + }, "devDependencies":{ "testbox":"^4.1.0+384" }, @@ -47,4 +50,4 @@ "testbox":{ "runner":"http://localhost:60299/tests/runner.cfm" } -} \ No newline at end of file +} diff --git a/changelog.md b/changelog.md index 47dab84..398a5be 100644 --- a/changelog.md +++ b/changelog.md @@ -7,7 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ---- -## Unreleased +## [Unreleased] + +### Added + +- Adobe 2023 Testing and Support +- New Github Actions +- New supporting files + +### Fixed + +- Removal of `box.zip` in root from old scripts ### ⚠ BREAKING @@ -19,11 +29,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Added support for `@myCustomTag` custom docblock tags on methods. (Already supported on components and properties, but missing on methods). * Added GitHub Actions CI for automated testing, format checking, releases and more -### 🐛 FIX: +### 🐛 FIX * Fixes support for Adobe 2018. (Mainly in the CommandBox strategy.) -## 3.0.0 +## [3.0.0] ### Added @@ -44,7 +54,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ---- -## 2.2.1 +## [2.2.1] ### Fixed @@ -52,7 +62,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ---- -## 2.2.0 +## [2.2.0] ### Added @@ -61,7 +71,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Added `@deprecated` annotation to function definitions ---- -## 2.1.0 + +## [2.1.0] ### Fixed @@ -71,7 +82,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ---- -## 2.0.7 +## [2.0.7] ### Fixed @@ -79,7 +90,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ---- -## 2.0.6 +## [2.0.6] ### Fixed @@ -95,7 +106,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ---- -## 2.0.5 +## [2.0.5] ### Improved @@ -103,7 +114,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ---- -## 2.0.4 +## [2.0.4] ### Improved @@ -111,7 +122,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ---- -## 2.0.3 +## [2.0.3] ### Fixed @@ -119,7 +130,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ---- -## 2.0.2 +## [2.0.2] ### Fixed @@ -131,7 +142,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ---- -## 2.0.1 +## [2.0.1] ### Fixed @@ -139,7 +150,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ---- -## 2.0.0 +## [2.0.0] ### Improved diff --git a/server-adobe@2023.json b/server-adobe@2023.json new file mode 100644 index 0000000..8a1a1f0 --- /dev/null +++ b/server-adobe@2023.json @@ -0,0 +1,21 @@ +{ + "name":"docbox-adobe@2023", + "app":{ + "cfengine":"adobe@2023" + }, + "web":{ + "http":{ + "port":"60299" + }, + "rewrites":{ + "enable":"true" + } + }, + "jvm":{ + "heapSize":"1024" + }, + "openBrowser":"false", + "scripts":{ + "onServerInstall":"cfpm install zip,debugger" + } +} From 55d195af3667ce47ac13e78508e08edc41ccc2f9 Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Tue, 13 Feb 2024 11:52:18 +0100 Subject: [PATCH 04/11] update to latest build file --- build/.travis.yml | 111 ++++++++++++++++++++++++++++++++++++++++++++++ build/Build.cfc | 62 +++++++++++--------------- 2 files changed, 138 insertions(+), 35 deletions(-) create mode 100644 build/.travis.yml diff --git a/build/.travis.yml b/build/.travis.yml new file mode 100644 index 0000000..a3ab2fb --- /dev/null +++ b/build/.travis.yml @@ -0,0 +1,111 @@ +language: java + +notifications: + slack: + secure: FIHlTn/YO7Wgumm1uIqmoEsqjQA7fV0AE94Rjc5yKzM3AquQa8HicgDVVk0d2GrKRnl0xt3j4ZJV//VJyIjlCd/QVKuj48R2ChjEY2im3+99HFPafCUI5/S2uyowKU6mJTFonH9v6p41eqxdbiAxJdDGOT0V2Gpt3UBSNuHz8ED9/aIHqv+P7M+VD6Xd2XYwctPniWlaSWx57sWcnG/VkFG45qFQAyha64uxOOe4M3ZmG/n5FfauZ8cBVLiRKEIr+CyNhh1ujfzi7+4uzMlSNL5t/BbZamAQuZzqGzGQ9RVvIlyPgUGNJtDEE/hWS09aagXF5T6EMj00szizErh4J1/x4qZwml5+TcBN31E0QmAhCtZe85sr3tYgic+hEz9XX1yymQzf/C7n4to2yNvq0r4g51xDk8IuP95WEh7zaqLlvFZvBFgxpHZBMYlRvhytjOYDeIFRMcGwHZcXosaG2ejqDwcGq/LC4oeG4sSwmg9sdRrtcmcanrNqrBka86WYO6LntI3JdZ86/1ACEUHzhCCwvrKELc9Ji1xxGAgS7QKH+s2/hnJuiMyv73gOVLKYC+wPMLt+fvOmPLSEl+PJiAIlToBq1KUBg03RSQLfPOLD7OrJ8VvDZsEPwejqlGDyc4wRglS9OTi7SnN5LYHSDNDdGdREegWqq9qDHEYEVLI= + +env: + # Fill out these global variables for build process + matrix: + - ENGINE=lucee@5 + - ENGINE=adobe@2016 + - ENGINE=adobe@2018 + +branches: + only: + - development + - master + +sudo: required +dist: xenial + +before_install: +# CommandBox Keys + - curl -fsSl https://downloads.ortussolutions.com/debs/gpg | sudo apt-key add - + - sudo echo "deb https://downloads.ortussolutions.com/debs/noarch /" | sudo tee -a + /etc/apt/sources.list.d/commandbox.list + +install: + # Install Commandbox + - sudo apt-get update && sudo apt-get --assume-yes install jq commandbox + # Install CommandBox Supporting Librarires + - box install commandbox-cfconfig,commandbox-dotenv + # If using auto-publish, you will need to provide your API token with this line: + - box config set endpoints.forgebox.APIToken=$FORGEBOX_API_TOKEN > /dev/null + +script: + # Set Current Version and Travis Tag + - TARGET_VERSION=`cat $TRAVIS_BUILD_DIR/box.json | jq '.version' -r` + - TRAVIS_TAG=${TARGET_VERSION} + - echo "Starting build for DocBox v${TARGET_VERSION}" + # Replace version so builder can issue it + - box package set version=@build.version@+@build.number@ + # run our dependency install to ensure the workbench is in place + - box install + # run our matrix server + - box server start serverConfigFile="server-${ENGINE}.json" + # Build Project + - box task run taskfile=build/Build target=run :version=${TARGET_VERSION} :buildID=${TRAVIS_BUILD_NUMBER} :branch=${TRAVIS_BRANCH} + +after_failure: + - cd $TRAVIS_BUILD_DIR + # Display the contents of our root directory + # Spit out our Commandbox log in case we need to debug + - box server log server-${ENGINE}.json + - cat `box system-log` + +deploy: + # Binary Deployments + - provider: s3 + on: + branch: + - master + - development + #condition: "$ENGINE = lucee@4.5" + skip_cleanup: true + #AWS Credentials need to be set in Travis + access_key_id: $AWS_ACCESS_KEY + secret_access_key: $AWS_ACCESS_SECRET + bucket: "downloads.ortussolutions.com" + local-dir: $TRAVIS_BUILD_DIR/.artifacts/docbox + upload-dir: ortussolutions/docbox + acl: public_read + + #API Docs Deployment + - provider: s3 + on: + branch: + - master + - development + #condition: "$ENGINE = lucee@4.5" + skip_cleanup: true + #AWS Credentials need to be set in Travis + access_key_id: $AWS_ACCESS_KEY + secret_access_key: $AWS_ACCESS_SECRET + bucket: "apidocs.ortussolutions.com" + local-dir: $TRAVIS_BUILD_DIR/tests/apidocs + upload-dir: docbox/$BUILD_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/docbox/**/* + 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/docbox + - cat box.json + # Only publish once using the lucee matrix + - if [ ${ENGINE} = 'lucee@5' ]; then box forgebox publish; fi diff --git a/build/Build.cfc b/build/Build.cfc index 8ab5d34..dbec422 100644 --- a/build/Build.cfc +++ b/build/Build.cfc @@ -42,8 +42,8 @@ component { // Create Mappings fileSystemUtil.createMapping( - "coldbox", - variables.cwd & "test-harness/coldbox" + "docbox", + variables.cwd ); return this; @@ -55,11 +55,13 @@ component { * @projectName The project name used for resources and slugs * @version The version you are building * @buldID The build identifier + * @branch The branch you are building */ function run( required projectName, version = "1.0.0", - buildID = createUUID() + buildID = createUUID(), + branch = "development" ){ // Create project mapping fileSystemUtil.createMapping( arguments.projectName, variables.cwd ); @@ -74,11 +76,8 @@ component { // checksums buildChecksums(); - // Build latest changelog - latestChangelog(); - // Finalize Message - print + variables.print .line() .boldMagentaLine( "Build Process is done! Enjoy your build!" ) .toConsole(); @@ -88,8 +87,14 @@ component { * Run the test suites */ function runTests(){ - // Tests First, if they fail then exit - print.blueLine( "Testing the package, please wait..." ).toConsole(); + variables.print + .line() + .boldGreenLine( "------------------------------------------------" ) + .boldGreenLine( "Starting to execute your tests..." ) + .boldGreenLine( "------------------------------------------------" ) + .toConsole(); + + var sTime = getTickCount(); command( "testbox run" ) .params( @@ -103,6 +108,13 @@ component { // Check Exit Code? if ( shell.getExitCode() ) { return error( "Cannot continue building, tests failed!" ); + } else { + variables.print + .line() + .boldGreenLine( "------------------------------------------------" ) + .boldGreenLine( "All tests passed in #getTickCount() - sTime#ms! Ready to go, great job!" ) + .boldGreenLine( "------------------------------------------------" ) + .toConsole(); } } @@ -112,15 +124,17 @@ component { * @projectName The project name used for resources and slugs * @version The version you are building * @buldID The build identifier + * @branch The branch you are building */ function buildSource( required projectName, version = "1.0.0", - buildID = createUUID() + buildID = createUUID(), + branch = "development" ){ // Build Notice ID - print + variables.print .line() .boldMagentaLine( "Building #arguments.projectName# v#arguments.version#" @@ -187,13 +201,11 @@ component { outputDir = ".tmp/apidocs" ){ ensureExportDir( argumentCollection = arguments ); - directoryCreate( arguments.outputDir, true, true ); - - // Create project mapping - fileSystemUtil.createMapping( arguments.projectName, variables.cwd ); // Generate Docs print.greenLine( "Generating API Docs, please wait..." ).toConsole(); + directoryCreate( arguments.outputDir, true, true ); + // Generate the docs command( "docbox generate" ) .params( "source" = "models", @@ -216,26 +228,6 @@ component { ); } - /** - * 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 *********************************************/ From af383ea189f063c83f012b90978c1f68e2415315 Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Tue, 13 Feb 2024 12:32:22 +0100 Subject: [PATCH 05/11] - Adobe 2023 Testing and Support - New Github Actions - New supporting files - New `build/Docs.cfc` task for building the documentation using itself, before we where getting away with it because there was a previous DocBox version. Now we need to build the docs with the current version of DocBox. --- .github/ISSUE_TEMPLATE/BUG_REPORT.md | 33 ++++ .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md | 18 ++ .github/PULL_REQUEST_TEMPLATE.md | 29 ++++ .github/workflows/ci.yml | 119 ------------- .github/workflows/gh-release.yml | 19 --- .github/workflows/pr.yml | 5 +- .github/workflows/release.yml | 198 ++++++++++++++++++++++ .github/workflows/snapshot.yml | 44 +++++ .github/workflows/tests.yml | 32 ++-- box.json | 14 +- build/Build.cfc | 67 ++------ build/Docs.cfc | 89 ++++++++++ build/release.boxr | 11 -- changelog.md | 57 ++++--- 14 files changed, 474 insertions(+), 261 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/BUG_REPORT.md create mode 100644 .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/gh-release.yml create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/snapshot.yml create mode 100644 build/Docs.cfc diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.md b/.github/ISSUE_TEMPLATE/BUG_REPORT.md new file mode 100644 index 0000000..300232e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.md @@ -0,0 +1,33 @@ +--- +name: Bug report +about: Create a report to help us improve +--- + + + +## What are the steps to reproduce this issue? + +1. … +2. … +3. … + +## What happens? + +… + +## What were you expecting to happen? + +… + +## Any logs, error output, etc? + +… + +## Any other comments? + +… + +## What versions are you using? + +**Operating System:** … +**Package Version:** … diff --git a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md new file mode 100644 index 0000000..c10946f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md @@ -0,0 +1,18 @@ +--- +name: Feature Request +about: Request a new feature or enhancement +--- + + + +## Summary + + + +## Detailed Description + + + +## Possible Implementation Ideas + + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..e8bd9f9 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,29 @@ +# Description + +Please include a summary of the changes and which issue(s) is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. + +**Please note that all PRs must have tests attached to them** + +IMPORTANT: Please review the [CONTRIBUTING.md](../CONTRIBUTING.md) file for detailed contributing guidelines. + +## Issues + +All PRs must have an accompanied issue. Please make sure you created it and linked it here. + +## Type of change + +Please delete options that are not relevant. + +- [ ] Bug Fix +- [ ] Improvement +- [ ] New Feature +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] This change requires a documentation update + +## Checklist + +- [ ] My code follows the style guidelines of this project [cfformat](../.cfformat.json) +- [ ] I have commented my code, particularly in hard-to-understand areas +- [ ] I have made corresponding changes to the documentation +- [ ] I have added tests that prove my fix is effective or that my feature works +- [ ] New and existing unit tests pass locally with my changes diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index ae63d63..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,119 +0,0 @@ -name: DocBox CI - -# Only on Development we build snapshots -on: - push: - branches: - - development - - master - -env: - MODULE_ID: docbox - SNAPSHOT: ${{ github.ref_name != 'main' && github.ref_name != 'master' }} - -jobs: - ############################################# - # Tests First baby! We fail, no build :( - ############################################# - tests: - uses: ./.github/workflows/tests.yml - secrets: inherit - - ############################################# - # Build ContentBox - ############################################# - build: - name: Build & Publish - needs: tests - runs-on: ubuntu-20.04 - steps: - - name: Checkout Repository - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Setup Java - uses: actions/setup-java@v2 - with: - distribution: "adopt" - java-version: "11" - - - name: Cache CommandBox Dependencies - uses: actions/cache@v3 - if: ${{ true }} - with: - path: ~/.CommandBox/artifacts - key: ${{ runner.OS }}-commandbox-cache-${{ hashFiles( 'box.json' ) }}-${{ hashFiles( 'tests/box.json' ) }} - restore-keys: | - ${{ runner.OS }}-commandbox-cache-${{ hashFiles( 'box.json' ) }}-${{ hashFiles( 'tests/box.json' ) }} - - - name: Setup CommandBox - uses: Ortus-Solutions/setup-commandbox@v2.0.0 - with: - forgeboxAPIKey: ${{ secrets.FORGEBOX_TOKEN }} - - - name: Read version - id: current_version - run: | - export PACKAGE_VERSION=$( cat box.json | jq '.version' -r ) - box package set version=@build.version@ - # master or snapshot - echo "Github Ref is $GITHUB_REF" - echo "VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV - if [ $SNAPSHOT ] - then - echo "VERSION=$PACKAGE_VERSION-snapshot+${{ github.run_number}}" >> $GITHUB_ENV - fi - - - name: Build ${{ env.MODULE_ID }} - run: | - box install commandbox-docbox - box task run taskfile=build/Build target=run :version=${{ env.VERSION }} :projectName=${{ env.MODULE_ID }} :buildID=${{ github.run_number }} - - - name: Upload Build Artifacts - if: success() - uses: actions/upload-artifact@v2 - with: - name: ${{ env.MODULE_ID }} - path: | - .artifacts/**/* - - - name: Upload Binaries to S3 - uses: jakejarvis/s3-sync-action@master - with: - args: --acl public-read - env: - AWS_S3_BUCKET: "downloads.ortussolutions.com" - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_SECRET }} - SOURCE_DIR: ".artifacts/${{ env.MODULE_ID }}" - DEST_DIR: "ortussolutions/${{ env.MODULE_ID }}" - - - name: Upload API Docs to S3 - uses: jakejarvis/s3-sync-action@master - with: - args: --acl public-read - env: - AWS_S3_BUCKET: "apidocs.ortussolutions.com" - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_SECRET }} - SOURCE_DIR: ".tmp/apidocs" - DEST_DIR: "${{ env.MODULE_ID }}/${{ env.VERSION }}" - - - name: Publish To ForgeBox - run: | - cd .tmp/${{ env.MODULE_ID }} - cat box.json - box forgebox publish - - - name: Inform Slack of Build - if: ${{ always() }} - uses: rtCamp/action-slack-notify@v2 - env: - SLACK_CHANNEL: coding - SLACK_COLOR: ${{ job.status }} # or a specific color like 'green' or '#ff00ff' - SLACK_ICON_EMOJI: ":bell:" - SLACK_MESSAGE: '${{ env.MODULE_ID }} Built with ${{ job.status }}!' - SLACK_TITLE: "${{ env.MODULE_ID }} Build" - SLACK_USERNAME: CI - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/.github/workflows/gh-release.yml b/.github/workflows/gh-release.yml deleted file mode 100644 index 9f9c254..0000000 --- a/.github/workflows/gh-release.yml +++ /dev/null @@ -1,19 +0,0 @@ -# Publish Github Release -name: Github Release - -on: - push: - tags: - - v[0-9]+.* - -jobs: - create-release: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: taiki-e/create-gh-release-action@v1.6.1 - with: - # Produced by the build/Build.cfc - changelog: changelog.md - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 0455b6d..3a5bbf1 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -15,15 +15,14 @@ on: jobs: tests: uses: ./.github/workflows/tests.yml - secrets: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + secrets: inherit formatCheck: name: Checks Source Code Formatting runs-on: ubuntu-20.04 steps: - name: Checkout Repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - uses: Ortus-Solutions/commandbox-action@v1.0.3 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..7a290e6 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,198 @@ +# This workflow is used to build releases +# It can also be called by other workflows to reuse the release flow. +name: DocBox Release + +on: + # If you push to master|main this will trigger a stable release + push: + branches: + - master + - main + + # Reusable workflow : Usually called by a `snapshot` workflow + workflow_call: + inputs: + snapshot: + description: 'Is this a snapshot build?' + required: false + default: false + type: boolean + +env: + MODULE_ID: docbox + SNAPSHOT: ${{ inputs.snapshot || false }} + +jobs: + ############################################# + # Build Snapshot or Final Release + ############################################# + build: + name: Build & Publish Release + runs-on: ubuntu-20.04 + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: "temurin" + java-version: "11" + + - name: Setup CommandBox + uses: Ortus-Solutions/setup-commandbox@v2.0.1 + with: + forgeboxAPIKey: ${{ secrets.FORGEBOX_API_TOKEN }} + + - name: Setup Environment Variables For Build Process + id: current_version + run: | + echo "PACKAGE_VERSION=`cat box.json | jq '.version' -r`" >> $GITHUB_ENV + box package set version=@build.version@+@build.number@ + # master or snapshot + echo "Github Ref is $GITHUB_REF" + echo "BRANCH=master" >> $GITHUB_ENV + if [ $GITHUB_REF == 'refs/heads/development' ] + then + echo "BRANCH=development" >> $GITHUB_ENV + fi + + - name: Install Dependencies + run: | + box install + + - name: Update changelog [unreleased] with latest version + uses: thomaseizinger/keep-a-changelog-new-release@1.3.0 + if: env.SNAPSHOT == 'false' + with: + changelogPath: ./changelog.md + tag: v${{ env.PACKAGE_VERSION }} + + - name: Build ${{ env.MODULE_ID }} + run: | + # Fix changelog markdown + npm install -g markdownlint-cli + markdownlint changelog.md --fix + # Build it + box task run taskfile=build/Build target=run :version=${{ env.VERSION }} :projectName=${{ env.MODULE_ID }} :buildID=${{ github.run_number }} + + - name: Commit Changelog [unreleased] with latest version + uses: EndBug/add-and-commit@v9.1.4 + if: env.SNAPSHOT == 'false' + with: + author_name: Github Actions + author_email: info@ortussolutions.com + message: 'Finalized changelog for v${{ env.PACKAGE_VERSION }}' + add: changelog.md + + - name: Tag Version + uses: rickstaa/action-create-tag@v1.7.2 + if: env.SNAPSHOT == 'false' + with: + tag: "v${{ env.PACKAGE_VERSION }}" + force_push_tag: true + message: "Latest Release v${{ env.PACKAGE_VERSION }}" + + - name: Upload Build Artifacts + if: success() + uses: actions/upload-artifact@v4 + with: + name: ${{ env.MODULE_ID }} + path: | + .artifacts/**/* + changelog.md + + - name: Upload Binaries to S3 + uses: jakejarvis/s3-sync-action@master + with: + args: --acl public-read + env: + AWS_S3_BUCKET: "downloads.ortussolutions.com" + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_SECRET }} + SOURCE_DIR: ".artifacts/${{ env.MODULE_ID }}" + DEST_DIR: "ortussolutions/${{ env.MODULE_ID }}" + + - name: Upload API Docs to S3 + uses: jakejarvis/s3-sync-action@master + with: + args: --acl public-read + env: + AWS_S3_BUCKET: "apidocs.ortussolutions.com" + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_SECRET }} + SOURCE_DIR: ".artifacts/${{ env.MODULE_ID }}" + DEST_DIR: "ortussolutions/${{ env.MODULE_ID }}" + + - name: Publish to ForgeBox + run: | + cd .tmp/${{ env.MODULE_ID }} + cat box.json + box forgebox publish + + - name: Create Github Release + uses: taiki-e/create-gh-release-action@v1.8.0 + continue-on-error: true + if: env.SNAPSHOT == 'false' + with: + title: ${{ env.PACKAGE_VERSION }} + changelog: changelog.md + token: ${{ secrets.GITHUB_TOKEN }} + ref: refs/tags/v${{ env.PACKAGE_VERSION }} + + - name: Inform Slack + if: ${{ always() }} + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_CHANNEL: coding + SLACK_COLOR: ${{ job.status }} # or a specific color like 'green' or '#ff00ff' + SLACK_ICON_EMOJI: ":bell:" + SLACK_MESSAGE: '${{ env.MODULE_ID }} Built with ${{ job.status }}!' + SLACK_TITLE: "${{ env.MODULE_ID }} Build" + SLACK_USERNAME: CI + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} + + ########################################################################################## + # Prep Next Release + ########################################################################################## + prep_next_release: + name: Prep Next Release + if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' + runs-on: ubuntu-20.04 + needs: [ build ] + steps: + - name: Checkout Development Repository + uses: actions/checkout@v4 + with: + ref: development + + - name: Setup CommandBox + uses: Ortus-Solutions/setup-commandbox@v2.0.1 + with: + forgeboxAPIKey: ${{ secrets.FORGEBOX_TOKEN }} + + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: ${{ env.MODULE_ID }} + path: .tmp + + # Copy the changelog to the development branch + - name: Copy Changelog + run: | + cp .tmp/changelog.md changelog.md + + - name: Bump Version + run: | + box bump --minor --!TagVersion + git pull + + - name: Commit Version Bump + uses: EndBug/add-and-commit@v9.1.4 + with: + author_name: Github Actions + author_email: info@ortussolutions.com + message: 'Version bump' + add: | + box.json + changelog.md diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml new file mode 100644 index 0000000..17fb332 --- /dev/null +++ b/.github/workflows/snapshot.yml @@ -0,0 +1,44 @@ +name: Snapshots + +on: + push: + branches: + - development + +jobs: + ############################################# + # Tests First baby! We fail, no build :( + ############################################# + tests: + uses: ./.github/workflows/tests.yml + secrets: inherit + + ########################################################################################## + # Format Source Code + ########################################################################################## + format: + name: Code Auto-Formatting + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + + - name: Auto-format + uses: Ortus-Solutions/commandbox-action@v1.0.3 + with: + cmd: run-script format + + - name: Commit Format Changes + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: Apply cfformat changes + push_options: --force + + ############################################# + # Build Snapshot Release + ############################################# + build: + uses: ./.github/workflows/release.yml + needs: [ tests, format ] + secrets: inherit + with: + snapshot: true diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 12fd128..22c3c76 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,39 +11,26 @@ jobs: tests: name: Tests runs-on: ubuntu-20.04 - env: - DB_USER: root - DB_PASSWORD: root strategy: fail-fast: false matrix: - cfengine: [ "lucee@5", "adobe@2018", "adobe@2021" ] + cfengine: [ "lucee@5", "adobe@2018", "adobe@2021", "adobe@2023" ] steps: - name: Checkout Repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup Java - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: - distribution: "adopt" + distribution: "temurin" java-version: "11" - name: Setup CommandBox CLI uses: Ortus-Solutions/setup-commandbox@main - - name: Cache CommandBox Dependencies - uses: actions/cache@v3 - if: ${{ true }} - with: - path: ~/.CommandBox/artifacts - key: ${{ runner.OS }}-commandbox-cache-${{ hashFiles( 'box.json' ) }}-${{ hashFiles( 'tests/box.json' ) }} - restore-keys: | - ${{ runner.OS }}-commandbox-cache-${{ hashFiles( 'box.json' ) }}-${{ hashFiles( 'tests/box.json' ) }} - - name: Install Test Harness Dependencies run: | box install - cd tests && box install - name: Start ${{ matrix.cfengine }} Server run: | @@ -64,7 +51,7 @@ jobs: - name: Upload Test Results to Artifacts if: always() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: test-results-${{ matrix.cfengine }} path: | @@ -87,3 +74,12 @@ jobs: SLACK_TITLE: ${{ github.repository }} Tests For ${{ matrix.cfengine }} failed SLACK_USERNAME: CI SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} + + - name: Upload Debugging Info To Artifacts + if: ${{ failure() }} + uses: actions/upload-artifact@v4 + with: + name: Failure Debugging Info - ${{ matrix.cfengine }} + path: | + .engine/**/logs/* + .engine/**/WEB-INF/cfusion/logs/* diff --git a/box.json b/box.json index ab48a72..6fa7d16 100644 --- a/box.json +++ b/box.json @@ -25,11 +25,10 @@ "Brad Wood " ], "dependencies":{ - "commandbox-cfformat":"*", - "commandbox-docbox":"*" + "commandbox-cfformat":"*" }, "devDependencies":{ - "testbox":"^4.1.0+384" + "testbox":"^5" }, "installPaths":{ "testbox":"testbox/" @@ -42,10 +41,13 @@ "coldbox-5-router-documentation.png" ], "scripts":{ + "build":"task run taskFile=build/Build.cfc :projectName=docbox :version=`package show version`", + "build:docs" : "task run build/Docs.cfc", + "tests" : "task run taskFile=build/Build.cfc target=runTests", "release":"recipe build/release.boxr", - "format":"cfformat run --overwrite DocBox.cfc,strategy,tests", - "format:watch":"cfformat watch DocBox.cfc,strategy,tests ./.cfformat.json", - "format:check":"cfformat check DocBox.cfc,strategy,tests" + "format":"cfformat run --overwrite DocBox.cfc,build,strategy,tests", + "format:watch":"cfformat watch DocBox.cfc,build,strategy,tests ./.cfformat.json", + "format:check":"cfformat check DocBox.cfc,build,strategy,tests" }, "testbox":{ "runner":"http://localhost:60299/tests/runner.cfm" diff --git a/build/Build.cfc b/build/Build.cfc index dbec422..e03cf09 100644 --- a/build/Build.cfc +++ b/build/Build.cfc @@ -11,7 +11,6 @@ component { variables.cwd = getCWD().reReplace( "\.$", "" ); variables.artifactsDir = cwd & "/.artifacts"; variables.buildDir = cwd & "/.tmp"; - variables.apiDocsURL = "http://localhost:60299/apidocs/"; variables.testRunner = "http://localhost:60299/tests/runner.cfm"; // Source Excludes Not Added to final binary @@ -41,16 +40,13 @@ component { } ); // Create Mappings - fileSystemUtil.createMapping( - "docbox", - variables.cwd - ); + fileSystemUtil.createMapping( "docbox", variables.cwd ); return this; } /** - * Run the build process: test, build source, docs, checksums + * Run the build process: test, build source, checksums * * @projectName The project name used for resources and slugs * @version The version you are building @@ -69,10 +65,6 @@ component { // Build the source buildSource( argumentCollection = arguments ); - // Build Docs - arguments.outputDir = variables.buildDir & "/apidocs"; - docs( argumentCollection = arguments ); - // checksums buildChecksums(); @@ -98,10 +90,10 @@ component { command( "testbox run" ) .params( - runner = variables.testRunner, - verbose = true, - outputFile = "#variables.cwd#/tests/results/test-results", - outputFormats="json,antjunit" + runner = variables.testRunner, + verbose = true, + outputFile = "#variables.cwd#/tests/results/test-results", + outputFormats = "json,antjunit" ) .run(); @@ -132,13 +124,10 @@ component { buildID = createUUID(), branch = "development" ){ - // Build Notice ID variables.print .line() - .boldMagentaLine( - "Building #arguments.projectName# v#arguments.version#" - ) + .boldMagentaLine( "Building #arguments.projectName# v#arguments.version#" ) .toConsole(); ensureExportDir( argumentCollection = arguments ); @@ -192,43 +181,6 @@ component { ); } - /** - * Produce the API Docs - */ - function docs( - required projectName, - version = "1.0.0", - outputDir = ".tmp/apidocs" - ){ - ensureExportDir( argumentCollection = arguments ); - // Generate Docs - print.greenLine( "Generating API Docs, please wait..." ).toConsole(); - directoryCreate( arguments.outputDir, true, true ); - - // Generate the docs - command( "docbox generate" ) - .params( - "source" = "models", - "mapping" = "models", - "strategy-projectTitle" = "#arguments.projectName# v#arguments.version#", - "strategy-outputDir" = arguments.outputDir - ) - .run(); - - print.greenLine( "API Docs produced at #arguments.outputDir#" ).toConsole(); - - var destination = "#variables.exportsDir#/#projectName#-docs-#version#.zip"; - print.greenLine( "Zipping apidocs to #destination#" ).toConsole(); - cfzip( - action = "zip", - file = "#destination#", - source = "#arguments.outputDir#", - overwrite = true, - recurse = true - ); - } - - /********************************************* PRIVATE HELPERS *********************************************/ /** @@ -300,13 +252,14 @@ component { */ private function ensureExportDir( required projectName, - version = "1.0.0" + version = "1.0.0" ){ - if ( structKeyExists( variables, "exportsDir" ) && directoryExists( variables.exportsDir ) ){ + if ( structKeyExists( variables, "exportsDir" ) && directoryExists( variables.exportsDir ) ) { return; } // Prepare exports directory variables.exportsDir = variables.artifactsDir & "/#projectName#/#arguments.version#"; directoryCreate( variables.exportsDir, true, true ); } + } diff --git a/build/Docs.cfc b/build/Docs.cfc new file mode 100644 index 0000000..c7f8272 --- /dev/null +++ b/build/Docs.cfc @@ -0,0 +1,89 @@ +/** + * Dog eat Dog: Build your own docs + */ +component { + + /** + * Constructor + */ + function init(){ + // Setup Pathing + variables.cwd = getCWD().reReplace( "\.$", "" ); + variables.artifactsDir = cwd & "/.artifacts"; + variables.buildDir = cwd & "/.tmp"; + variables.apidocsDir = variables.buildDir & "/apidocs"; + variables.projectName = "docbox"; + + // Cleanup + Init Build Directories + [ + variables.buildDir, + variables.artifactsDir + ].each( function( item ){ + if ( directoryExists( item ) ) { + directoryDelete( item, true ); + } + // Create directories + directoryCreate( item, true, true ); + } ); + + // Create Mappings + fileSystemUtil.createMapping( "docbox", variables.cwd ); + + return this; + } + + /** + * Build the docs! + */ + function run( version = "1.0.0" ){ + ensureExportDir( argumentCollection = arguments ); + directoryCreate( variables.apidocsDir, true, true ); + print.greenLine( "Generating API Docs, please wait..." ).toConsole(); + + new docbox.DocBox() + .addStrategy( + "HTML", + { + projectTitle : "DocBox API Docs", + outputDir : variables.apidocsDir + } + ) + .addStrategy( + "JSON", + { + projectTitle : "DocBox API Docs", + outputDir : variables.apidocsDir + } + ) + .generate( + source = expandPath( "/docbox" ), + mapping = "docbox", + excludes = "(.github|build|tests)" + ); + + print.greenLine( "API Docs produced at #variables.apidocsDir#" ).toConsole(); + + var destination = "#variables.exportsDir#/#projectName#-docs-#version#.zip"; + print.greenLine( "Zipping apidocs to #destination#" ).toConsole(); + cfzip( + action = "zip", + file = "#destination#", + source = "#variables.apidocsDir#", + overwrite = true, + recurse = true + ); + } + + /** + * Ensure the export directory exists at artifacts/NAME/VERSION/ + */ + private function ensureExportDir( version = "1.0.0" ){ + if ( structKeyExists( variables, "exportsDir" ) && directoryExists( variables.exportsDir ) ) { + return; + } + // Prepare exports directory + variables.exportsDir = variables.artifactsDir & "/#projectName#/#arguments.version#"; + directoryCreate( variables.exportsDir, true, true ); + } + +} diff --git a/build/release.boxr b/build/release.boxr index e216f22..a63f2cc 100755 --- a/build/release.boxr +++ b/build/release.boxr @@ -7,19 +7,8 @@ # Merge development into it for release !git merge --no-ff development -# Tag the master repo with the version from box.json -!git tag v`box package show version` - # 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 -!git commit -a -m "version bump" -!git push origin development \ No newline at end of file diff --git a/changelog.md b/changelog.md index 398a5be..6a02aaa 100644 --- a/changelog.md +++ b/changelog.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Adobe 2023 Testing and Support - New Github Actions - New supporting files +- New `build/Docs.cfc` task for building the documentation using itself, before we where getting away with it because there was a previous DocBox version. Now we need to build the docs with the current version of DocBox. ### Fixed @@ -21,36 +22,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### ⚠ BREAKING -* Dropped support for Adobe 2016. Adobe doesn't support ACF 16 anymore, so neither do we. +- Dropped support for Adobe 2016. Adobe doesn't support ACF 16 anymore, so neither do we. ### 📦 NEW -* Added support for Adobe 2021 -* Added support for `@myCustomTag` custom docblock tags on methods. (Already supported on components and properties, but missing on methods). -* Added GitHub Actions CI for automated testing, format checking, releases and more +- Added support for Adobe 2021 +- Added support for `@myCustomTag` custom docblock tags on methods. (Already supported on components and properties, but missing on methods). +- Added GitHub Actions CI for automated testing, format checking, releases and more ### 🐛 FIX -* Fixes support for Adobe 2018. (Mainly in the CommandBox strategy.) +- Fixes support for Adobe 2018. (Mainly in the CommandBox strategy.) ## [3.0.0] ### Added -* New `json` output strategy for machine-readable documentation -* New `addStrategy()` method for multiple strategy support +- New `json` output strategy for machine-readable documentation +- New `addStrategy()` method for multiple strategy support ### Changed -* Can configure strategy with "alias" name, like `strategy="HTML"`. +- Can configure strategy with "alias" name, like `strategy="HTML"`. ### Removed -* Removed HTML as the default strategy. You will need to explicitly pass this to the constructor or to `docbox.addStrategy( "HTML", props )` to set your desired output format. +- Removed HTML as the default strategy. You will need to explicitly pass this to the constructor or to `docbox.addStrategy( "HTML", props )` to set your desired output format. ### Fixed -* Fixed failing XMI strategy +- Fixed failing XMI strategy ---- @@ -58,7 +59,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -* Bug on DocBox tracing errors, left over a couple of `()` +- Bug on DocBox tracing errors, left over a couple of `()` ---- @@ -66,9 +67,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -* Better output of trace commands for CLI integration -* Added `@throws` annotation to function definitions -* Added `@deprecated` annotation to function definitions +- Better output of trace commands for CLI integration +- Added `@throws` annotation to function definitions +- Added `@deprecated` annotation to function definitions ---- @@ -76,9 +77,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -* Varscoping issue to help with COMMANDBOX-399 -* BUGFIX: Missing pound sign in ExpandPath(), added better wording for custom strategy path -* Fix cleanPath without a leading slash with regex updates +- Varscoping issue to help with COMMANDBOX-399 +- BUGFIX: Missing pound sign in ExpandPath(), added better wording for custom strategy path +- Fix cleanPath without a leading slash with regex updates ---- @@ -86,7 +87,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -* Build process messed up folder structure. Basically 2.0.6 was unusable +- Build process messed up folder structure. Basically 2.0.6 was unusable ---- @@ -94,15 +95,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -* DOCBOX-1 - Extra slash breaks some links on S3-hosted docs +- DOCBOX-1 - Extra slash breaks some links on S3-hosted docs ### Improved -* Updated build process +- Updated build process ### Added -* Travis integration +- Travis integration ---- @@ -110,7 +111,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Improved -* Moved CommandBox command to its own repo +- Moved CommandBox command to its own repo ---- @@ -118,7 +119,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Improved -* Update package directory and location for CommandBox command +- Update package directory and location for CommandBox command ---- @@ -126,7 +127,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -* FireFox location bug +- FireFox location bug ---- @@ -134,11 +135,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -* Fixes on conversion to script +- Fixes on conversion to script ### Improved -* Updates on box.json for standalone installations +- Updates on box.json for standalone installations ---- @@ -146,7 +147,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -* Fixes for ACF +- Fixes for ACF ---- @@ -154,4 +155,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Improved -* Updated to DocBox styles +- Updated to DocBox styles From 5691299a75da233a5b5f81f9f922f605da1553f8 Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Tue, 13 Feb 2024 12:36:24 +0100 Subject: [PATCH 06/11] fix checkout githubaction to latest --- .github/workflows/snapshot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index 17fb332..129f1a8 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -20,7 +20,7 @@ jobs: name: Code Auto-Formatting runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Auto-format uses: Ortus-Solutions/commandbox-action@v1.0.3 From c7ce6a67f4e874ae2a37b2689abaca123fe06d99 Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Tue, 13 Feb 2024 12:40:35 +0100 Subject: [PATCH 07/11] fixing version --- .github/workflows/release.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7a290e6..4d61ef2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,7 +47,7 @@ jobs: - name: Setup Environment Variables For Build Process id: current_version run: | - echo "PACKAGE_VERSION=`cat box.json | jq '.version' -r`" >> $GITHUB_ENV + echo "VERSION=`cat box.json | jq '.version' -r`" >> $GITHUB_ENV box package set version=@build.version@+@build.number@ # master or snapshot echo "Github Ref is $GITHUB_REF" @@ -66,7 +66,7 @@ jobs: if: env.SNAPSHOT == 'false' with: changelogPath: ./changelog.md - tag: v${{ env.PACKAGE_VERSION }} + tag: v${{ env.VERSION }} - name: Build ${{ env.MODULE_ID }} run: | @@ -82,16 +82,16 @@ jobs: with: author_name: Github Actions author_email: info@ortussolutions.com - message: 'Finalized changelog for v${{ env.PACKAGE_VERSION }}' + message: 'Finalized changelog for v${{ env.VERSION }}' add: changelog.md - name: Tag Version uses: rickstaa/action-create-tag@v1.7.2 if: env.SNAPSHOT == 'false' with: - tag: "v${{ env.PACKAGE_VERSION }}" + tag: "v${{ env.VERSION }}" force_push_tag: true - message: "Latest Release v${{ env.PACKAGE_VERSION }}" + message: "Latest Release v${{ env.VERSION }}" - name: Upload Build Artifacts if: success() @@ -135,10 +135,10 @@ jobs: continue-on-error: true if: env.SNAPSHOT == 'false' with: - title: ${{ env.PACKAGE_VERSION }} + title: ${{ env.VERSION }} changelog: changelog.md token: ${{ secrets.GITHUB_TOKEN }} - ref: refs/tags/v${{ env.PACKAGE_VERSION }} + ref: refs/tags/v${{ env.VERSION }} - name: Inform Slack if: ${{ always() }} From e1c878369c1117d9d37f45e59a7399bde05388a6 Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Tue, 13 Feb 2024 12:47:06 +0100 Subject: [PATCH 08/11] removing emojis to publish --- changelog.md | 6 +++--- readme.md | 19 ++++++++----------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/changelog.md b/changelog.md index 6a02aaa..8bc650b 100644 --- a/changelog.md +++ b/changelog.md @@ -20,17 +20,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Removal of `box.zip` in root from old scripts -### ⚠ BREAKING +### BREAKING - Dropped support for Adobe 2016. Adobe doesn't support ACF 16 anymore, so neither do we. -### 📦 NEW +### NEW - Added support for Adobe 2021 - Added support for `@myCustomTag` custom docblock tags on methods. (Already supported on components and properties, but missing on methods). - Added GitHub Actions CI for automated testing, format checking, releases and more -### 🐛 FIX +### FIX - Fixes support for Adobe 2018. (Mainly in the CommandBox strategy.) diff --git a/readme.md b/readme.md index 7516945..5455819 100644 --- a/readme.md +++ b/readme.md @@ -1,16 +1,12 @@ [![All Contributors](https://img.shields.io/github/contributors/Ortus-Solutions/DocBox?style=flat-square)](https://github.com/michaelborn/DocBox/graphs/contributors) | -[![Master Branch Build Status](https://img.shields.io/travis/Ortus-Solutions/DocBox/master.svg?style=flat-square&label=master)](https://travis-ci.org/Ortus-Solutions/DocBox) -| -[![Development Branch Build Status](https://img.shields.io/travis/Ortus-Solutions/DocBox/development.svg?style=flat-square&label=development)](https://travis-ci.org/Ortus-Solutions/DocBox) -| ![Latest release](https://img.shields.io/github/v/release/Ortus-Solutions/DocBox?style=flat-square) ```text ██████╗ ██████╗ ██████╗██████╗ ██████╗ ██╗ ██╗ ██╔══██╗██╔═══██╗██╔════╝██╔══██╗██╔═══██╗╚██╗██╔╝ -██║ ██║██║ ██║██║ ██████╔╝██║ ██║ ╚███╔╝ -██║ ██║██║ ██║██║ ██╔══██╗██║ ██║ ██╔██╗ +██║ ██║██║ ██║██║ ██████╔╝██║ ██║ ╚███╔╝ +██║ ██║██║ ██║██║ ██╔══██╗██║ ██║ ██╔██╗ ██████╔╝╚██████╔╝╚██████╗██████╔╝╚██████╔╝██╔╝ ██╗ ╚═════╝ ╚═════╝ ╚═════╝╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ``` @@ -33,8 +29,8 @@ DocBox is a JavaDoc-style documentation generator for your CFML codebase based o ## SYSTEM REQUIREMENTS -- Lucee 5+ -- ColdFusion 2016+ +* Lucee 5+ +* ColdFusion 2016+ ## Usage @@ -42,7 +38,7 @@ Use the DocBox library to generate API docs from your CFC files. Install Docbox ```bash box install docbox -``` +``` ### Standalone Application @@ -55,8 +51,8 @@ docbox = new docbox.DocBox( strategy="class.path", properties={} ); // create with HTML strategy docbox = new docbox.DocBox( strategy = "HTML", - properties = { - projectTitle="My Docs", + properties = { + projectTitle="My Docs", outputDir="#expandPath( '/docs' )#" } ); @@ -103,6 +99,7 @@ There is a related project you can install which wraps up the DocBox library in ```bash box install commandbox-docbox ``` + Read more here: https://github.com/Ortus-Solutions/commandbox-docbox ---- From ff9d522ad25803311b7ffbf27aacd6df66eb12ab Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Tue, 13 Feb 2024 13:02:55 +0100 Subject: [PATCH 09/11] missing build version --- box.json | 2 +- build/Build.cfc | 13 ++++++++++++- changelog.md | 7 +++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/box.json b/box.json index 6fa7d16..1176976 100644 --- a/box.json +++ b/box.json @@ -1,6 +1,6 @@ { "name":"DocBox", - "version":"3.3.0", + "version":"4.1.0", "author":"Ortus Solutions, Corp", "location":"http://downloads.ortussolutions.com/ortussolutions/docbox/@build.version@/docbox-@build.version@.zip", "homepage":"https://forgebox.io/view/docbox", diff --git a/build/Build.cfc b/build/Build.cfc index e03cf09..c2b7adf 100644 --- a/build/Build.cfc +++ b/build/Build.cfc @@ -159,7 +159,18 @@ component { .params( path = "/#variables.projectBuildDir#/**", token = "@build.version@", - replacement = arguments.version + replacement = arguments.version, + verbose = true + ) + .run(); + + print.greenLine( "Updating build identifier to [#arguments.buildID#-#arguments.branch#]..." ).toConsole(); + command( "tokenReplace" ) + .params( + path = "/#variables.projectBuildDir#/**", + token = ( arguments.branch == "master" ? "@build.number@" : "+@build.number@" ), + replacement = ( arguments.branch == "master" ? arguments.buildID : "-snapshot" ), + verbose = true ) .run(); diff --git a/changelog.md b/changelog.md index 8bc650b..72464ee 100644 --- a/changelog.md +++ b/changelog.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Build Versions and changelog - Removal of `box.zip` in root from old scripts ### BREAKING @@ -34,6 +35,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixes support for Adobe 2018. (Mainly in the CommandBox strategy.) +## [4.0.0] - 2023-08-03 + +### Changed + +- Dropped Adobe 2016 support + ## [3.0.0] ### Added From 80a5404c06ebab1848c6e97fd444fa1c99ddba70 Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Tue, 13 Feb 2024 15:34:05 +0100 Subject: [PATCH 10/11] fixing build assets --- build/Build.cfc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/build/Build.cfc b/build/Build.cfc index c2b7adf..ab61e8b 100644 --- a/build/Build.cfc +++ b/build/Build.cfc @@ -16,13 +16,9 @@ component { // Source Excludes Not Added to final binary variables.excludes = [ "build", - "node-modules", - "resources", - "test-harness", - "(package|package-lock).json", - "webpack.config.js", + "testbox", + "tests", "server-.*\.json", - "docker-compose.yml", "^\..*", "coldbox-5-router-documentation.png" ]; From d12817d29f4d2760d40542e029db70f72cde8a64 Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Tue, 13 Feb 2024 15:39:04 +0100 Subject: [PATCH 11/11] updated changelog items --- changelog.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/changelog.md b/changelog.md index 72464ee..b54e245 100644 --- a/changelog.md +++ b/changelog.md @@ -21,6 +21,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Build Versions and changelog - Removal of `box.zip` in root from old scripts +## [4.0.0] - 2023-08-03 + ### BREAKING - Dropped support for Adobe 2016. Adobe doesn't support ACF 16 anymore, so neither do we. @@ -35,12 +37,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixes support for Adobe 2018. (Mainly in the CommandBox strategy.) -## [4.0.0] - 2023-08-03 - -### Changed - -- Dropped Adobe 2016 support - ## [3.0.0] ### Added