Skip to content

Commit

Permalink
Merge branch 'release-7.0.0' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicWatson committed Jun 16, 2023
2 parents db237f4 + fe42583 commit 1c4e1ef
Show file tree
Hide file tree
Showing 5 changed files with 164 additions and 241 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ on:
pull_request:
jobs:
ci:
name: CI for Pirate
name: CI for Preside CommandBox Commands
runs-on: ubuntu-latest
steps:
- name: Setup flow variables
run: |
branch=${GITHUB_REF##*/}
publish=false
if [[ "{{ env.event.name }}" != "pull_request" ]] ; then
if [[ $branch == v* ]] ; then
if [[ $branch == release-* ]] || [[ $branch == v* ]] ; then
publish=true
fi
fi
Expand All @@ -39,7 +39,7 @@ jobs:

- name: Zip project
if: "env.PUBLISH == 'true'"
run: zip -rq $ZIP_FILE * -x *.log
run: zip -rq $ZIP_FILE * -x jmimemagic.log -x .* -x *.sh -x *.log -x tests/**\*
shell: bash
env:
ZIP_FILE: ${{ steps.versiongen.outputs.semver_release_number }}.zip
Expand All @@ -51,7 +51,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
tag_name: ${{ steps.versiongen.outputs.semver_release_string }}
release_name: Release ${{ steps.versiongen.outputs.semver_release_string }}
draft: false
prerelease: ${{ steps.versiongen.outputs.semver_release_is_snapshot }}
Expand Down Expand Up @@ -81,4 +81,4 @@ jobs:
uses: pixl8/github-action-box-publish@v3
with:
forgebox_user: ${{ secrets.FORGEBOX_USER }}
forgebox_pass: ${{ secrets.FORGEBOX_PASS }}
forgebox_pass: ${{ secrets.FORGEBOX_PASS }}
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 7.0.0

Rewrite of core commands to bring up to date with latest changes and approaches from Commandbox. We now use cfconfig
for `preside server start` and have resolved the issues with datasource prompts overlapping Commandbox text

## 6.1.6

* Fix for broken paths in Gruntfile generated for new extension command when choosing to manage static assets with grunt
Expand Down
76 changes: 0 additions & 76 deletions _resources/lucee-web.xml.cfm

This file was deleted.

53 changes: 36 additions & 17 deletions commands/preside/new/site.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,39 @@ component {
property name="wirebox" inject="wirebox";
property name="forgeBox" inject="ForgeBox";


/**
* @skeleton.hint The name of the app skeleton to use. Options: basic, nocms
**/
function run( string skeleton = "" ) {
var directory = shell.pwd();
var templates = _getSkeletonTemplates();

while( arguments.skeleton == "" ) {
if ( !Len( arguments.skeleton ) ) {
print.yellowLine( "Looking up available skeletons from forgebox.io... (hint: register a template by adding a forgebox package matching the pattern, 'preside-skeleton-*')" );
print.line();
print.line().toConsole();

if ( templates.isEmpty() ) {
print.line( "" );
print.redLine( "No preside skeleton templates could be found! Ensure you are online and that https://www.forgebox.io is up and running." );
print.line( "" );
}
} else {
var options = [];
var i=0;
for( var templateId in templates ) {
var template = templates[ templateId ];

print.line( "" );
print.line( "Available skeleton templates from which to build your new site/application:" );
print.line( "" );
for( var templateId in templates ) {
print.text( " * " );
print.yellowText( "#templateId#" );
print.line( ": #templates[ templateId ].description#" );
}
print.line( "" );
ArrayAppend( options, {
value = templateId
, display = template.name & ( template.official ? " (OFFICIAL)" : " (by #template.author#)" ) & ": " & template.description
, accessKey = ++i
} );
}

arguments.skeleton = multiselect( "Choose a skeleton template to use: " ).options( options ).required().ask();

print.line( "" );

arguments.skeleton = ask( "Enter the skeleton template to use: " );
if ( !templates.keyExists( arguments.skeleton ) ) {
arguments.skeleton = "";
}
}

Expand Down Expand Up @@ -102,15 +105,31 @@ component {
private struct function _getSkeletonTemplates() {
var templates = {};
var forgeboxEntries = forgebox.getEntries( typeSlug = "preside-skeletons" );
var official = [ "preside-skeleton-basic", "preside-skeleton-webapp" ];
var ordered = StructNew( "linked" );

for( var entry in forgeboxEntries.results ) {
templates[ entry.slug.replace( "preside-skeleton-", "" ) ] = {
name = entry.title
, description = entry.summary
, package = entry.slug
, author = entry.user.fullName ?: "unknown"
, official = ArrayFindNoCase( official, entry.slug )
};
}

return templates;
if ( StructKeyExists( templates, "basic" ) ) {
ordered[ "basic" ] = templates.basic;
}
if ( StructKeyExists( templates, "basic" ) ) {
ordered[ "webapp" ] = templates.webapp;
}
for( var key in templates ) {
if ( !ArrayFind( [ "basic", "webapp" ], key ) ) {
ordered[ key ] = templates[ key ];
}
}

return ordered;
}
}
Loading

0 comments on commit 1c4e1ef

Please sign in to comment.