Skip to content

Commit

Permalink
try different approaches
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitzer committed Jun 28, 2024
1 parent 81b5005 commit 1ce4683
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/bundle-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ jobs:
env:
LUCEE_CLI_PRINTEXCEPTIONS: TRUE
LUCEE_ENABLE_BUNDLE_DOWNLOAD: FALSE
LUCEE_ADMIN_DEFAULT_PASSWORD: lucee-test
LUCEE_ADMIN_PASSWORD: lucee-test
# LUCEE_ADMIN_DEFAULT_PASSWORD: lucee-test
# LUCEE_ADMIN_PASSWORD: lucee-test

44 changes: 30 additions & 14 deletions custom/bundle-test/index.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,42 @@
systemOutput( "Argon", true );
generateArgon2Hash( "lucee" );
*/
adminPassword = "lucee-test";
/*
systemOutput( "", true );
systemOutput( "writing password to #expandPath('{lucee-config}/password.txt')#", true );
fileWrite( expandPath('{lucee-config}/password.txt'), adminPassword );
function checkPassword() {
try {
admin action="connect"
type="server"
password=adminPassword;
} catch ( e ) {
return false;
}
return true;
}
systemOutput( "check password", true );
admin
action="checkPassword"
type="server";
*/
/*
admin
systemOutput( "see if password is set via env var: #checkPassword()#", true );
if (!checkPassword() ) {
systemOutput( "try updatePassword", true );
dmin
action="updatePassword"
type="server"
oldPassword=""
newPassword="lucee";
*/
newPassword="#adminPassword#";
}
if (!checkPassword() ) {
systemOutput( "try writing password to #expandPath('{lucee-config}/password.txt')#", true );
fileWrite( expandPath('{lucee-config}/password.txt'), adminPassword );
systemOutput( "check password", true );
admin
action="checkPassword"
type="server";
}
systemOutput( "getBundles", true );
admin type="server"
password=adminPassword
action="getBundles"
Expand Down

0 comments on commit 1ce4683

Please sign in to comment.