Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
bdw429s committed Dec 7, 2022
2 parents 5415d37 + 021a3c9 commit b1b89a4
Show file tree
Hide file tree
Showing 42 changed files with 737 additions and 366 deletions.
9 changes: 5 additions & 4 deletions build/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,20 @@ java.debug=true

#dependencies
dependencies.dir=${basedir}/lib
cfml.version=5.3.9.160
cfml.version=5.3.10.97
cfml.extensions=8D7FB0DF-08BB-1589-FE3975678F07DB17
cfml.loader.version=2.7.2
cfml.loader.version=2.8.1
cfml.cli.version=${cfml.loader.version}.${cfml.version}
lucee.version=${cfml.version}
# Don't bump this version. Need to remove this dependency from cfmlprojects.org
lucee.config.version=5.2.4.37
jre.version=jdk-11.0.15+10
jre.version=jdk-11.0.17+8
launch4j.version=3.14
runwar.version=4.7.13
runwar.version=4.7.16
jline.version=3.21.0
jansi.version=2.3.2
jgit.version=5.13.0.202109080827-r
json-smart-mini.version=1.3.2

#build locations
build.type=localdev
Expand Down
125 changes: 69 additions & 56 deletions build/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ External Dependencies:
<property name="distro.groupID" value="ortussolutions" />
<property name="distro.name" value="commandbox"/>
<!-- Special things happen when the version and stableVersion are the same value as that signifies a "stable" build. -->
<property name="commandbox.version" value="5.6.0"/>
<property name="commandbox.stableVersion" value="5.6.0"/>
<property name="commandbox.version" value="5.7.0"/>
<property name="commandbox.stableVersion" value="5.7.0"/>

<!-- Time Label -->
<tstamp prefix="start"/>
Expand Down Expand Up @@ -342,60 +342,49 @@ External Dependencies:
</zip>
<copy file="${dist.dir}/${distro.name}-cfml-${commandbox.version}.zip" toFile="${temp.dir}/cli/cfml.zip" overwrite="true" />

<!-- Build Checksum for cfml.zip -->
<!-- Build Checksum for commandbox-cfml.zip -->
<checksum file="${dist.dir}/${distro.name}-cfml-${commandbox.version}.zip" forceoverwrite="true" fileext=".md5" />
<checksum file="${dist.dir}/${distro.name}-cfml-${commandbox.version}.zip" forceoverwrite="true" algorithm="sha" />
<checksum file="${dist.dir}/${distro.name}-cfml-${commandbox.version}.zip" forceoverwrite="true" algorithm="SHA-256" fileext=".sha256"/>

<!-- create the libs zip including cli loader, optionally use pack200 -->
<!-- <antcontrib:if>
<equals arg1="${isStable}" arg2="sdfsdf" />
<then>
<echo>This is a stable build, let's compress these jars!</echo>
<delete dir="${temp.dir}/packlibs" />
<mkdir dir="${temp.dir}/packlibs"/>
<mkdir dir="${temp.dir}/packlibs/packed"/>
<copy todir="${temp.dir}/packlibs">
<fileset dir="${lucee.lib.dir}">
<include name="**/*.jar"/>
<exclude name="**/lucee-loader.jar"/>
<exclude name="**/javax*servlet.jar"/>
<exclude name="**/org*mortbay*jetty.jar"/>
</fileset>
<fileset file="${temp.dir}/cli/luceecli.jar" />
<fileset file="${temp.dir}/cli/ortus-jgit.jar" />
</copy>
<packjars dir="${temp.dir}/packlibs" packdir="${temp.dir}/packlibs/packed" excludes="ESAPI*,microsoft-*"/>
<zip destfile="${temp.dir}/cli/libs.zip">
<fileset dir="${temp.dir}/packlibs/packed"/>
</zip>
<delete dir="${temp.dir}/packlibs" />
</then>
<else> -->
<zip destfile="${temp.dir}/cli/libs.zip">
<fileset dir="${lucee.lib.dir}">
<include name="**/*.jar"/>
<exclude name="**/lucee-loader.jar"/>
<exclude name="**/javax*servlet.jar"/>
<exclude name="**/org*mortbay*jetty.jar"/>
</fileset>
<fileset file="${temp.dir}/cli/luceecli.jar" />
<fileset file="${temp.dir}/cli/ortus-jgit.jar" />
<fileset file="${src.dir}/resources/log4j2.xml" />
</zip>

<zip destfile="${temp.dir}/cli-light/libs.zip">
<fileset dir="${lucee-light.lib.dir}">
<include name="**/*.jar"/>
<exclude name="**/lucee-loader.jar"/>
<exclude name="**/javax*servlet.jar"/>
<exclude name="**/org*mortbay*jetty.jar"/>
</fileset>
<fileset file="${temp.dir}/cli/luceecli.jar" />
<fileset file="${temp.dir}/cli/ortus-jgit.jar" />
<fileset file="${src.dir}/resources/log4j2.xml" />
</zip>
<zip destfile="${temp.dir}/cli/libs.zip">
<fileset dir="${lucee.lib.dir}">
<include name="**/*.jar"/>
<exclude name="**/lucee-loader.jar"/>
<exclude name="**/javax*servlet.jar"/>
<exclude name="**/org*mortbay*jetty.jar"/>
</fileset>
<fileset file="${temp.dir}/cli/luceecli.jar" />
<fileset file="${temp.dir}/cli/ortus-jgit.jar" />
<fileset file="${src.dir}/resources/log4j2.xml" />
</zip>

<!-- Copy our libs to the dist folder -->
<copy file="${temp.dir}/cli/libs.zip" toFile="${dist.dir}/${distro.name}-libs-${commandbox.version}.zip" overwrite="true" />
<!-- Build Checksum for commandbox-libs.zip -->
<checksum file="${dist.dir}/${distro.name}-libs-${commandbox.version}.zip" forceoverwrite="true" fileext=".md5" />
<checksum file="${dist.dir}/${distro.name}-libs-${commandbox.version}.zip" forceoverwrite="true" algorithm="sha" />
<checksum file="${dist.dir}/${distro.name}-libs-${commandbox.version}.zip" forceoverwrite="true" algorithm="SHA-256" fileext=".sha256"/>

<zip destfile="${temp.dir}/cli-light/libs.zip">
<fileset dir="${lucee-light.lib.dir}">
<include name="**/*.jar"/>
<exclude name="**/lucee-loader.jar"/>
<exclude name="**/javax*servlet.jar"/>
<exclude name="**/org*mortbay*jetty.jar"/>
</fileset>
<fileset file="${temp.dir}/cli/luceecli.jar" />
<fileset file="${temp.dir}/cli/ortus-jgit.jar" />
<fileset file="${src.dir}/resources/log4j2.xml" />
</zip>

<!-- Copy our light libs to the dist folder -->
<copy file="${temp.dir}/cli-light/libs.zip" toFile="${dist.dir}/${distro.name}-libs-light-${commandbox.version}.zip" overwrite="true" />
<!-- Build Checksum for commandbox-libs.zip -->
<checksum file="${dist.dir}/${distro.name}-libs-light-${commandbox.version}.zip" forceoverwrite="true" fileext=".md5" />
<checksum file="${dist.dir}/${distro.name}-libs-light-${commandbox.version}.zip" forceoverwrite="true" algorithm="sha" />
<checksum file="${dist.dir}/${distro.name}-libs-light-${commandbox.version}.zip" forceoverwrite="true" algorithm="SHA-256" fileext=".sha256"/>

<!-- </else>
</antcontrib:if> -->
Expand All @@ -413,7 +402,7 @@ External Dependencies:
<fileset file="${temp.dir}/cli/cfml.zip" />
<fileset file="${temp.dir}/cli/engine.zip" />
<fileset dir="${temp.dir}/cli/bin" />
<zipfileset src="${lib.dir}/json-smart-mini-1.0.8.jar" includes="**/*.class" />
<zipfileset src="${lib.dir}/json-smart-mini-${json-smart-mini.version}.jar" includes="**/*.class" />
<fileset file="${temp.dir}/cli/version"/>
</jar>

Expand All @@ -426,7 +415,7 @@ External Dependencies:
<fileset file="${temp.dir}/cli/cfml.zip" />
<fileset file="${temp.dir}/cli-light/engine.zip" />
<fileset dir="${temp.dir}/cli/bin" />
<zipfileset src="${lib.dir}/json-smart-mini-1.0.8.jar" includes="**/*.class" />
<zipfileset src="${lib.dir}/json-smart-mini-${json-smart-mini.version}.jar" includes="**/*.class" />
<fileset file="${temp.dir}/cli/version"/>
</jar>

Expand All @@ -436,7 +425,7 @@ External Dependencies:
<attribute name="Main-Class" value="cliloader.LoaderCLIMain" />
</manifest>
<fileset dir="${temp.dir}/cli/bin" />
<zipfileset src="${lib.dir}/json-smart-mini-1.0.8.jar" includes="**/*.class" />
<zipfileset src="${lib.dir}/json-smart-mini-${json-smart-mini.version}.jar" includes="**/*.class" />
<fileset file="${temp.dir}/cli/version"/>
</jar>

Expand All @@ -459,6 +448,28 @@ External Dependencies:
stableVersion="${commandbox.stableVersion}"
classifiers="cfml,bin,win,deb,rpm,apidocs"/>


<if>
<equals arg1="${isStable}" arg2="true"/>
<then>
<property name="previousStableVersion" value="${cfml.loader.version}"/>
</then>
<else>
<property name="boxLoaderPath" location="${artifact.dir}/box-loader.json"/>
<get src="https://s3.amazonaws.com/downloads.ortussolutions.com/ortussolutions/commandbox/box-loader.json"
dest="${boxLoaderPath}"
verbose="true" />

<script language="javascript">//<![CDATA[
var json = new Packages.java.lang.String(
Packages.java.nio.file.Files.readAllBytes(
Packages.java.nio.file.Paths.get(project.getProperty("boxLoaderPath"))), "UTF-8");
var properties = JSON.parse(json);
project.setProperty('previousStableVersion', properties.versioning.stableVersion );
//]]></script>
</else>
</if>

<!-- Create box-loader.json -->
<concat destfile="${artifact.dir}/box-loader.json" overwrite="true">{
"artifactID" : "commandbox-loader",
Expand All @@ -467,14 +478,16 @@ External Dependencies:
"latestVersion" : "${cfml.loader.version}",
"latestBuildID" : "${build.number}",
"latestUpdated" : "${repo.timestamp.DSTAMP}${repo.timestamp.TSTAMP}",
"stableVersion" : "${cfml.loader.version}",
"stableVersion" : "${previousStableVersion}",
"versions" : [],
"classifiers" : ""
}
}</concat>

</target>



<!-- Build Homebrew Recipe -->
<target name="build.homebrew" description="Builds the Homebrew Recipe" unless="${local.build}">
<property name="tapRepo" value="git@github.com:Ortus-Solutions/homebrew-boxtap.git"/>
Expand Down Expand Up @@ -1074,7 +1087,7 @@ External Dependencies:
</dependency>

<dependency groupId="com.beust" artifactId="jcommander" version="1.47" dest="${lib.dir}" type="jar" unzip="false"/>
<dependency groupId="net.minidev" artifactId="json-smart-mini" version="1.0.8" unzip="false" type="jar" dest="${lib.dir}"/>
<dependency groupId="net.minidev" artifactId="json-smart-mini" version="${json-smart-mini.version}" unzip="false" type="jar" dest="${lib.dir}"/>

<!-- engine libs -->
<!-- stable builds require "maven-repository", and snapshots require "sonatype-repository" -->
Expand Down
2 changes: 2 additions & 0 deletions src/cfml/system/Bootstrap.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ This file will stay running the entire time the shell is open
if( verboseErrors ) {
systemOutput( '', true );
systemOutput( '#err.stacktrace#', true );
systemOutput( 'To disable full stack trace, run "config set verboseErrors=false"', true);
systemOutput( '', true );
} else {
systemOutput( '', true );
systemOutput( 'To enable full stack trace, run "config set verboseErrors=true"', true );
Expand Down
6 changes: 3 additions & 3 deletions src/cfml/system/Quotes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ Everything you do w/ CommandBox servers, you can do at scale with Docker
See what artifacts are cached on disk with "artifacts list"
See what packages you've installed in your app with the "list" command
Use "server cd myServer" to drop directly in the webroot of a server
You can manage your server.json entire from the CLI with "server set"
You can manage your box.json entire from the CLI with "server set"
You can manage your server.json entirely from the CLI with "server set"
You can manage your box.json entirely from the CLI with "package set"
CommandBox servers run on JBoss Undertow for blazing fast performance
Install the "comamndbox-chuck-norris" module for Chuck Norris facts
Run "forgebox whoami" to see if you're logged in correctly from the CLI
Expand All @@ -143,4 +143,4 @@ In the unlikely event of a water landing, CLI can be used as a flotation device
Let me see those Jazz Hands!
Have brainstorms so big they leave your hair windswept
Hey Little Bobby Two hands, update your CLI!
Your angry birds are out of cupcakes, buy more powerup gems to start a new server
Your angry birds are out of cupcakes, buy more powerup gems to start a new server
1 change: 1 addition & 0 deletions src/cfml/system/Shell.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -1024,6 +1024,7 @@ component accessors="true" singleton {
if( verboseErrors ) {
variables.reader.getTerminal().writer().println( '' );
variables.reader.getTerminal().writer().print( arguments.err.stacktrace );
variables.reader.getTerminal().writer().print( variables.print.whiteText( 'To disable full stack trace, run ' ) & variables.print.boldYellowText( 'config set verboseErrors=false' ) );
} else {
variables.reader.getTerminal().writer().println();
variables.reader.getTerminal().writer().println( variables.print.whiteText( 'To enable full stack trace, run ' ) & variables.print.boldYellowText( 'config set verboseErrors=true' ) );
Expand Down
6 changes: 4 additions & 2 deletions src/cfml/system/endpoints/Java.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ component accessors=true implements="IEndpoint" singleton {
property name="folderEndpoint" inject="commandbox.system.endpoints.Folder";
property name="PackageService" inject="packageService";
property name='configService' inject='configService';
property name='javaService' inject='javaService';

// Properties
property name="namePrefixes" type="string";
Expand All @@ -49,7 +50,7 @@ component accessors=true implements="IEndpoint" singleton {
public string function resolvePackage( required string package, boolean verbose=false ) {

if( configService.getSetting( 'offlineMode', false ) ) {
throw( 'Can''t download [#getNamePrefixes()#:#package#], CommandBox is in offline mode. Go online with [config set offlineMode=false].', 'endpointException' );
throw( 'Can''t download [#getNamePrefixes()#:#package#], CommandBox is in offline mode. Go online with [config set offlineMode=false].', 'endpointException' );
}

var lockVersion = false;
Expand Down Expand Up @@ -308,12 +309,13 @@ component accessors=true implements="IEndpoint" singleton {
var results = {
'version' : '',
'type' : 'jre',
'arch' : server.java.archModel contains 32 ? 'x32' : 'x64',
'arch' : javaService.getCurrentCPUArch(),
'os' : '',
'jvm-implementation' : ( ID.findNoCase( 'openj9' ) ? 'openj9' : 'hotspot' ),
'release' : 'latest'
};


if( fileSystemUtil.isMac() ) {
results.os = 'mac';
} else if( fileSystemUtil.isLinux() ) {
Expand Down
17 changes: 14 additions & 3 deletions src/cfml/system/endpoints/Lex.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -94,20 +94,31 @@ component accessors=true implements="IEndpoint" singleton {

public function getDefaultName( required string package ) {

// Check if its coming from an ortus S3 Domain
// /username/slug/version.(zip or lex)?unnecessary query_string
// Regex capture group (slug)
var findOrtusEndpoint = package.reFindNoCase( "^[\w:]+?//ortus-forgebox-private.s3.us-east-1.amazonaws.com/.+?/(.+?)/.+?\.[zip|lex].*", 0, true );

// /username/slug/version.(zip or lex)?unnecessary query_string
// Must match 2 because the capture groups are [whole string, slug]
if( findOrtusEndpoint.match.len() == 2 ) {
return findOrtusEndpoint.match[2]; //return slug from url path
}

// Strip protocol and host to reveal just path and query string
package = package.reReplaceNoCase( '^([\w:]+)?//.*?/', '' );

// Check and see if the name of the lex appears somewhere in the URL and use that as the package name
// https://search.maven.org/remotecontent?filepath=jline/jline/3.0.0.M1/jline-3.0.0.M1.lex
// https://site.com/path/to/package-1.0.0.lex

// If we see /foo.lex or name=foo.lex or ?foo.lex
if( package.reFindNoCase( '[/\?=](.*\.lex)' ) ) {
if( package.reFindNoCase( '[/\?=](.*\.[lex|zip])' ) ) {
// Then strip the name and remove extension
// Note the first .* is greedy so in the case of
// https://site.com/path/to/file.lex?name=custom.lex
// the regex will extract the last match, i.e. "custom"
return package.reReplaceNoCase( '.*[/\?=](.*\.lex).*', '\1' ).left( -4 );
return package.reReplaceNoCase( '.*[/\?=](.*\.[lex|zip]).*', '\1' ).left( -4 );
}

// We give up, so just make the entire URL a slug
Expand Down
4 changes: 2 additions & 2 deletions src/cfml/system/modules/globber/ModuleConfig.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ component {

this.name = "globber";
this.author = "";
this.webUrl = "https://github.com//globber";
this.webUrl = "https://github.com/Ortus-Solutions/globber/";

function configure() {
binder.map( 'globber' ).toDSL( 'globber@globber' );
}
}
}
2 changes: 1 addition & 1 deletion src/cfml/system/modules/globber/box.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name":"Globber",
"version":"3.1.3",
"version":"3.1.4",
"author":"Brad Wood",
"homepage":"https://github.com/Ortus-Solutions/globber/",
"documentation":"https://github.com/Ortus-Solutions/globber/",
Expand Down
Loading

0 comments on commit b1b89a4

Please sign in to comment.