mirror of
https://github.com/glenndehaan/unifi-voucher-site.git
synced 2026-03-31 06:24:00 -04:00
Moved build info to variables.js. Simplified info.js build readout. Added versions to user dropdown
This commit is contained in:
@@ -38,11 +38,7 @@ module.exports = () => {
|
||||
/**
|
||||
* Output build version
|
||||
*/
|
||||
if(fs.existsSync('/etc/unifi_voucher_site_build')) {
|
||||
log.info(`[Version] Git: ${variables.gitTag}, Build: ${fs.readFileSync('/etc/unifi_voucher_site_build', 'utf-8')}`);
|
||||
} else {
|
||||
log.info(`[Version] Git: ${variables.gitTag}, Build: **DEVELOPMENT**`);
|
||||
}
|
||||
log.info(`[Version] Git: ${variables.gitTag}, Build: ${variables.gitBuild}`);
|
||||
|
||||
/**
|
||||
* Log external config
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* Import base packages
|
||||
*/
|
||||
const fs = require('fs');
|
||||
|
||||
/**
|
||||
* Import own modules
|
||||
*/
|
||||
@@ -36,5 +41,6 @@ module.exports = {
|
||||
smtpUsername: config('smtp_username') || process.env.SMTP_USERNAME || '',
|
||||
smtpPassword: config('smtp_password') || process.env.SMTP_PASSWORD || '',
|
||||
logLevel: config('log_level') || process.env.LOG_LEVEL || 'info',
|
||||
gitTag: process.env.GIT_TAG || 'master'
|
||||
gitTag: process.env.GIT_TAG || 'master',
|
||||
gitBuild: fs.existsSync('/etc/unifi_voucher_site_build') ? fs.readFileSync('/etc/unifi_voucher_site_build', 'utf-8') : 'Development'
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user