Skip to content
This repository was archived by the owner on Apr 28, 2026. It is now read-only.

Commit dbf644a

Browse files
committed
get version from onapplicationstart.cfm
1 parent a9b7863 commit dbf644a

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

commands/wheels/base.cfc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,22 @@ component excludeFromHelp=true {
1919
string function $getWheelsVersion(){
2020
// First, look for a wheels folder..
2121
if(!directoryExists( fileSystemUtil.resolvePath("wheels") ) ){
22+
print.line(fileSystemUtil.resolvePath("wheels"));
23+
2224
error("We're currently looking in #getCWD()#, but can't find a /wheels/ folder?");
2325
}
2426
if(fileExists(fileSystemUtil.resolvePath("wheels/box.json"))){
2527
command( 'cd wheels' ).run();
2628
local.boxJSON = packageService.readPackageDescriptorRaw( getCWD() );
2729
command( 'cd ../' ).run();
2830
return local.boxJSON.version;
31+
} else if(fileExists(fileSystemUtil.resolvePath("wheels/events/onapplicationstart.cfm"))) {
32+
command( 'cd wheels' ).run();
33+
local.target=fileSystemUtil.resolvePath("events/onapplicationstart.cfm");
34+
local.content=fileRead(local.target);
35+
local.content=listFirst(mid(local.content, (find('application.$wheels.version',local.content)+31),20),'"');
36+
command( 'cd ../' ).run();
37+
return local.content;
2938
} else {
3039
print.line("You've not got a box.json, so we don't know which version of wheels this is.");
3140
print.line("We're currently looking in #getCWD()#");

0 commit comments

Comments
 (0)