Skip to content

Commit

Permalink
Merge pull request #99 from Ortus-Solutions/development
Browse files Browse the repository at this point in the history
merge dev into master
  • Loading branch information
bdw429s authored Oct 10, 2016
2 parents aa2db3f + 18993ab commit 559b4d4
Show file tree
Hide file tree
Showing 359 changed files with 2,287 additions and 949 deletions.
2 changes: 1 addition & 1 deletion apidocs/index.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ try{
}
);
baseDir = expandPath( '/commandbox' );
commandDirs = directoryList(path='/commandbox/system/modules', recurse=true, filter=function(path){ return reFindNoCase( '.*[/\\]commands$', arguments.path ); } );
commandDirs = directoryList(path='/commandbox/system/modules_app', recurse=true, filter=function(path){ return reFindNoCase( '.*[/\\]commands$', arguments.path ); } );
source = [
];
for( dir in commandDirs ) {
Expand Down
2 changes: 1 addition & 1 deletion apidocs/internal.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ try{
docbox.generate(
source = expandPath( "/commandbox/system" ),
mapping = "commandbox.system",
excludes = "system\/(modules)"
excludes = "system\/(modules),system\/(modules_app)"
);
} catch ( Any e ){
writeOutput( e.message & e.detail );
Expand Down
40 changes: 16 additions & 24 deletions build/brew-template.rb
Original file line number Diff line number Diff line change
@@ -1,40 +1,32 @@
require "formula"
# Version update PR to Homebrew requires only the information below:
class Commandbox < Formula
desc "CFML embedded server, package manager, and app scaffolding tools"
homepage "http://www.ortussolutions.com/products/commandbox"
url "@repoURL@/ortussolutions/commandbox/@version@/commandbox-bin-@[email protected]"
sha256 "@sha256@"
homepage "https://www.ortussolutions.com/products/commandbox"
url "@repoPRDURL@/ortussolutions/commandbox/@stable-version@/commandbox-bin-@[email protected]"
sha256 "@stable-sha256@"
version "@stable-version@"

devel do
url "@repoURL@/ortussolutions/commandbox/@version@/commandbox-bin-@[email protected]?build=@buildnumber@"
sha256 "@sha256@"
version "@version@"
end

bottle :unneeded

depends_on :arch => :x86_64
depends_on :java => "1.7+"

resource "apidocs" do
url "@repoURL@/ortussolutions/commandbox/@version@/commandbox-apidocs-@[email protected]"
sha256 "@apidocs.sha256@"
url "@repoPRDURL@/ortussolutions/commandbox/@stable-version@/commandbox-apidocs-@stable-[email protected]"
sha256 "@apidocs.stable-sha256@"
end

def install
bin.install "box"
doc.install resource("apidocs")
end

def caveats; <<-EOS.undent
CommandBox is licensed as open source software under the GNU Lesser General Public License v3
License information at:
http://www.gnu.org/licenses/lgpl-3.0.en.html
For full CommandBox documentation visit:
https://ortus.gitbooks.io/commandbox-documentation/
Source Code:
https://github.com/Ortus-Solutions/commandbox
EOS
end

test do
system "box", "install"
system "box", "--version"
system "box", "--commandbox_home=~/", "version"
system "box", "--commandbox_home=~/", "help"
end
end
10 changes: 5 additions & 5 deletions build/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ java.pack200=false

#dependencies
dependencies.dir=${basedir}/lib
cfml.version=4.5.2.018
cfml.loader.version=1.3.3
cfml.version=4.5.3.020
cfml.loader.version=1.3.8
cfml.cli.version=${cfml.loader.version}.${cfml.version}
lucee.version=4.5.2.018
jre.version=1.8.0_77
lucee.version=${cfml.version}
jre.version=1.8.0_102
launch4j.version=3.4
runwar.version=3.4.5
runwar.version=3.4.10

#build locations
build.type=localdev
Expand Down
132 changes: 108 additions & 24 deletions build/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ External Dependencies:
<!-- Version: UPDATE ON EACH RELEASE AS NEEDED -->
<property name="distro.groupID" value="ortussolutions" />
<property name="distro.name" value="commandbox"/>
<property name="commandbox.version" value="3.2.0"/>
<property name="commandbox.stableVersion" value="3.2.0"/>
<property name="commandbox.version" value="3.3.0"/>
<property name="commandbox.stableVersion" value="3.3.0"/>

<!-- Time Label -->
<tstamp prefix="start"/>
Expand Down Expand Up @@ -266,6 +266,7 @@ External Dependencies:
<!-- Build Checksum for 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>
Expand Down Expand Up @@ -324,6 +325,7 @@ External Dependencies:
<!-- Checksum on Jar -->
<checksum file="${dist.dir}/box.jar" forceoverwrite="true" fileext=".md5" />
<checksum file="${dist.dir}/box.jar" forceoverwrite="true" algorithm="sha" />
<checksum file="${dist.dir}/box.jar" forceoverwrite="true" algorithm="SHA-256" fileext=".sha256"/>

<!-- Create box-repo.json -->
<box-repo location="${artifact.dir}"
Expand Down Expand Up @@ -352,54 +354,125 @@ External Dependencies:

<!-- Build Homebrew Recipe -->
<target name="build.homebrew" description="Builds the Homebrew Recipe" depends="">
<property name="tapRepo" value="[email protected]:Ortus-Solutions/homebrew-boxtap.git"/>

<!-- Check sum properties -->
<!-- Grab the checksum again for our build files -->
<checksum file="${dist.dir}/${distro.name}-bin-${commandbox.version}.zip" property="commandbox.sha256" algorithm="SHA-256"/>
<checksum file="${dist.dir}/${distro.name}-apidocs-${commandbox.version}.zip" property="commandbox.apidocs.sha256" algorithm="SHA-256"/>

<!-- Retrieve our stable version checksums -->
<loadresource property="commandbox.stablesha256">
<file file="${artifact.baseDir}/${distro.groupID}/${distro.name}/${commandbox.stableVersion}/commandbox-bin-${commandbox.stableVersion}.zip.sha256"/>
<filterchain>
<striplinebreaks/>
<trim/>
</filterchain>
</loadresource>

<loadresource property="commandbox.apidocs.stablesha256">
<file file="${artifact.baseDir}/${distro.groupID}/${distro.name}/${commandbox.stableVersion}/commandbox-apidocs-${commandbox.stableVersion}.zip.sha256"/>
<filterchain>
<striplinebreaks/>
<trim/>
</filterchain>
</loadresource>

<!-- copy over prd file -->
<copy file="brew-template.rb"
tofile="${dist.dir}/commandbox.rb"
overwrite="true"
encoding="UTF-8" />
encoding="UTF-8" />

<replace file="${dist.dir}/commandbox.rb" value="" summary="yes" encoding="UTF-8">
<replacetoken>@be@</replacetoken>
</replace>
<replace file="${dist.dir}/commandbox.rb" value="${commandbox.stableVersion}" summary="yes" encoding="UTF-8">
<replacetoken>@stable-version@</replacetoken>
</replace>
<replace file="${dist.dir}/commandbox.rb" value="${commandbox.stablesha256}" summary="yes" encoding="UTF-8">
<replacetoken>@stable-sha256@</replacetoken>
</replace>
<replace file="${dist.dir}/commandbox.rb" value="${commandbox.version}" summary="yes" encoding="UTF-8">
<replacetoken>@version@</replacetoken>
</replace>
<replace file="${dist.dir}/commandbox.rb" value="${ortus.repoPRDURL}" summary="yes" encoding="UTF-8">
<replacetoken>@repoPRDURL@</replacetoken>
</replace>
<replace file="${dist.dir}/commandbox.rb" value="${ortus.repoURL}" summary="yes" encoding="UTF-8">
<replacetoken>@repoURL@</replacetoken>
</replace>
<replace file="${dist.dir}/commandbox.rb" value="${commandbox.sha256}" summary="yes" encoding="UTF-8">
<replacetoken>@sha256@</replacetoken>
</replace>
<replace file="${dist.dir}/commandbox.rb" value="${commandbox.apidocs.sha256}" summary="yes" encoding="UTF-8">
<replacetoken>@apidocs.sha256@</replacetoken>
<replace file="${dist.dir}/commandbox.rb" value="${commandbox.apidocs.stablesha256}" summary="yes" encoding="UTF-8">
<replacetoken>@apidocs.stable-sha256@</replacetoken>
</replace>
<replace file="${dist.dir}/commandbox.rb" value="${build.number}" summary="yes" encoding="UTF-8">
<replacetoken>@buildnumber@</replacetoken>
</replace>

<!-- copy over be file -->
<copy file="brew-template.rb"
tofile="${artifact.dir}/commandbox-be.rb"
<!-- Pull and Commit Our Tap Repo -->
<macrodef name="git">
<attribute name="command" />
<attribute name="dir" default="${dist.dir}" />
<element name="args" optional="true" />
<sequential>
<echo message="git @{command}" />
<exec executable="sudo" dir="@{dir}" failonerror="true">
<arg value="git" />
<arg value="@{command}" />
<args/>
</exec>
</sequential>
</macrodef>

<git command="clone">
<args>
<arg value="${tapRepo}"/>
</args>
</git>

<!-- Ensure write perms -->
<exec executable="sudo" dir="${dist.dir}" failonerror="true">
<arg value="chmod" />
<arg value="-R" />
<arg value="777" />
<arg value="./homebrew-boxtap" />
</exec>

<copy file="${dist.dir}/commandbox.rb"
tofile="${dist.dir}/homebrew-boxtap/commandbox.rb"
overwrite="true"
encoding="UTF-8" />

<replace file="${artifact.dir}/commandbox-be.rb" value="Be" summary="yes" encoding="UTF-8">
<replacetoken>@be@</replacetoken>
</replace>
<replace file="${artifact.dir}/commandbox-be.rb" value="${commandbox.version}" summary="yes" encoding="UTF-8">
<replacetoken>@version@</replacetoken>
</replace>
<replace file="${artifact.dir}/commandbox-be.rb" value="${ortus.repoURL}" summary="yes" encoding="UTF-8">
<replacetoken>@repoURL@</replacetoken>
</replace>
<replace file="${artifact.dir}/commandbox-be.rb" value="${commandbox.sha256}" summary="yes" encoding="UTF-8">
<replacetoken>@sha256@</replacetoken>
</replace>
<replace file="${artifact.dir}/commandbox-be.rb" value="${commandbox.apidocs.sha256}" summary="yes" encoding="UTF-8">
<replacetoken>@apidocs.sha256@</replacetoken>
</replace>
<property name="commit-message" value="CommandBox Build #${build.number}: Release @ ${commandbox.stableVersion}/Devel @ ${commandbox.version}"/>

<git command="add" dir="${dist.dir}/homebrew-boxtap">
<args>
<arg value="--all"/>
</args>
</git>


<git command="commit" dir="${dist.dir}/homebrew-boxtap">
<args>
<arg value="--allow-empty"/>
<arg value="-m ${commit-message}" />
</args>
</git>


<git command="push" dir="${dist.dir}/homebrew-boxtap" />

<!-- Ensure perms allow us to delete since GIT is runing as sudo-er -->
<exec executable="sudo" dir="${dist.dir}" failonerror="true">
<arg value="chmod" />
<arg value="-R" />
<arg value="777" />
<arg value="./homebrew-boxtap" />
</exec>

<delete dir="${dist.dir}/homebrew-boxtap"/>

</target>

Expand Down Expand Up @@ -431,6 +504,7 @@ External Dependencies:
<!-- Build Checksum -->
<checksum forceoverwrite="true" fileext=".md5" file="${dist.dir}/${distro.name}-apidocs-${commandbox.version}.zip" />
<checksum forceoverwrite="true" algorithm="sha" file="${dist.dir}/${distro.name}-apidocs-${commandbox.version}.zip" />
<checksum forceoverwrite="true" file="${dist.dir}/${distro.name}-apidocs-${commandbox.version}.zip" algorithm="SHA-256" fileext=".sha256"/>

<!-- Wipe & recreate for core API docs -->
<delete dir="${temp.dir}/apidocs" />
Expand All @@ -446,6 +520,7 @@ External Dependencies:
<!-- Build Checksum -->
<checksum forceoverwrite="true" fileext=".md5" file="${dist.dir}/${distro.name}-core-apidocs-${commandbox.version}.zip" />
<checksum forceoverwrite="true" algorithm="sha" file="${dist.dir}/${distro.name}-core-apidocs-${commandbox.version}.zip" />
<checksum forceoverwrite="true" file="${dist.dir}/${distro.name}-core-apidocs-${commandbox.version}.zip" algorithm="SHA-256" fileext=".sha256"/>

<!-- stop server -->
<exec executable="${dist.dir}/box" dir="${dir.apidocs}">
Expand Down Expand Up @@ -479,8 +554,10 @@ External Dependencies:
<!-- Build Checksum -->
<checksum file="${dist.dir}/${distro.name}-bin-${commandbox.version}.zip" forceoverwrite="true" fileext=".md5" />
<checksum file="${dist.dir}/${distro.name}-bin-${commandbox.version}.zip" forceoverwrite="true" algorithm="sha" />
<checksum file="${dist.dir}/${distro.name}-bin-${commandbox.version}.zip" forceoverwrite="true" algorithm="SHA-256" fileext=".sha256"/>
<checksum file="${dist.dir}/${distro.name}-sdk-bin-${commandbox.version}.zip" forceoverwrite="true" fileext=".md5" />
<checksum file="${dist.dir}/${distro.name}-sdk-bin-${commandbox.version}.zip" forceoverwrite="true" algorithm="sha" />
<checksum file="${dist.dir}/${distro.name}-sdk-bin-${commandbox.version}.zip" forceoverwrite="true" algorithm="SHA-256" fileext=".sha256"/>
</target>

<!-- Build windows executable -->
Expand Down Expand Up @@ -522,6 +599,7 @@ External Dependencies:
<!-- Build Checksum -->
<checksum file="${dist.dir}/${distro.name}-win-${commandbox.version}.zip" forceoverwrite="true" fileext=".md5" />
<checksum file="${dist.dir}/${distro.name}-win-${commandbox.version}.zip" forceoverwrite="true" algorithm="sha" />
<checksum file="${dist.dir}/${distro.name}-win-${commandbox.version}.zip" forceoverwrite="true" algorithm="SHA-256" fileext=".sha256"/>
</target>

<!-- Build including JREs -->
Expand Down Expand Up @@ -568,6 +646,11 @@ External Dependencies:
<include name="*-jre-*.zip" />
</fileset>
</checksum>
<checksum forceoverwrite="true" algorithm="SHA-256" fileext=".sha256">
<fileset dir="${dist.dir}">
<include name="*-jre-*.zip" />
</fileset>
</checksum>
</target>

<!-- Build local maven repository build.cli.deb,build.cli.exe,build.cli.rpm-->
Expand Down Expand Up @@ -613,6 +696,7 @@ External Dependencies:
<!-- Build Checksum -->
<checksum file="${dist.dir}/${distro.name}-debian-${commandbox.version}.deb" forceoverwrite="true" fileext=".md5" />
<checksum file="${dist.dir}/${distro.name}-debian-${commandbox.version}.deb" forceoverwrite="true" algorithm="sha" />
<checksum file="${dist.dir}/${distro.name}-debian-${commandbox.version}.deb" forceoverwrite="true" algorithm="SHA-256" fileext=".sha256"/>
<echo message="Updating apt (deb) repo in ${deb.repo}"/>
<!-- Update Repo -->
<deb-repo dir="${deb.repo}"
Expand Down
19 changes: 19 additions & 0 deletions src/cfml/system/box.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name":"CommandBox System Core",
"version":"@build.version@[email protected]@",
"author":"Brad Wood",
"shortDescription":"This tracks the CommandBox core dependencies",
"dependencies":{
"string-similarity":"^1.0.0",
"semver":"^1.0.0",
"globber":"^1.0.0"
},
"devDependencies":{

},
"installPaths":{
"string-similarity":"modules\\string-similarity",
"semver":"modules\\semver",
"globber":"modules\\globber"
}
}
Binary file added src/cfml/system/config/server-icons/home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/cfml/system/config/server-icons/info.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/cfml/system/config/server-icons/stop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 10 additions & 3 deletions src/cfml/system/endpoints/ForgeBox.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,15 @@ component accessors="true" implements="IEndpointInteractive" singleton {
return result;
}

// Verify in ForgeBox
var entryData = forgebox.getEntry( slug );
try {

// Verify in ForgeBox
var entryData = forgebox.getEntry( slug );

} catch( forgebox var e ) {
// This can include "expected" errors such as "Email already in use"
throw( e.message, 'endpointException', e.detail );
}

entryData.versions.sort( function( a, b ) { return semanticVersion.compare( b.version, a.version ) } );

Expand Down Expand Up @@ -336,7 +343,7 @@ component accessors="true" implements="IEndpointInteractive" singleton {
// entrylink,createdate,lname,isactive,installinstructions,typename,version,hits,coldboxversion,sourceurl,slug,homeurl,typeslug,
// downloads,entryid,fname,changelog,updatedate,downloadurl,title,entryrating,summary,username,description,email

if( !val( entryData.isActive ) ) {
if( !entryData.isActive ) {
throw( 'The ForgeBox entry [#entryData.title#] is inactive.', 'endpointException' );
}

Expand Down

This file was deleted.

Loading

0 comments on commit 559b4d4

Please sign in to comment.