Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ticketing System Should Use The Package Name When Building The Ref Number #2357

Merged
merged 1 commit into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .env.develop
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# This is here to ensure `npm run build` builds production-ready, compiled, code to deploy to develop.
NODE_ENV=production
VITE_APP='admin'
VITE_FIREBASE_API_KEY=$DEVELOP_FIREBASE_API_KEY
VITE_FIREBASE_AUTH_DOMAIN=$DEVELOP_FIREBASE_AUTH_DOMAIN
VITE_FIREBASE_DATABASE_URL=$DEVELOP_FIREBASE_DATABASE_URL
Expand Down
1 change: 0 additions & 1 deletion .env.production
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
NODE_ENV=production
VITE_APP='admin'
VITE_FIREBASE_API_KEY=$PROD_FIREBASE_API_KEY
VITE_FIREBASE_AUTH_DOMAIN=$PROD_FIREBASE_AUTH_DOMAIN
VITE_FIREBASE_DATABASE_URL=$PROD_FIREBASE_DATABASE_URL
Expand Down
1 change: 0 additions & 1 deletion .env.staging
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# This is here to ensure `npm run build` builds production-ready, complied, code to deploy to staging.
NODE_ENV=production
VITE_APP='admin'
VITE_FIREBASE_API_KEY=$STAGING_FIREBASE_API_KEY
VITE_FIREBASE_AUTH_DOMAIN=$STAGING_FIREBASE_AUTH_DOMAIN
VITE_FIREBASE_DATABASE_URL=$STAGING_FIREBASE_DATABASE_URL
Expand Down
1 change: 0 additions & 1 deletion .env.test
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Dummy env variables to enable our tests to run
NODE_ENV=test
VITE_APP='admin'
VITE_FIREBASE_API_KEY='firebase_api_key'
VITE_FIREBASE_AUTH_DOMAIN='firebase_auth_domain'
VITE_FIREBASE_DATABASE_URL='https://firebase_database_url.firebaseio.com'
Expand Down
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ export default {
},
showFeedbackLink() {
// Enable when the environment and app are defined (these are used when creating the bug request number)
return this.isSignedIn && this.isMounted && this.environment && (import.meta.env.VITE_APP !== undefined && import.meta.env.VITE_APP !== null);
return this.isSignedIn && this.isMounted && this.environment && (import.meta.env.PACKAGE_NAME !== undefined && import.meta.env.PACKAGE_NAME !== null);
},
},
watch: {
Expand Down
4 changes: 2 additions & 2 deletions src/store/bugReports/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ export default {
}),
create: async ({ rootState, rootGetters, dispatch }, data) => {

if (!rootGetters.appEnvironment || !import.meta.env.VITE_APP) {
if (!rootGetters.appEnvironment || !import.meta.env.PACKAGE_NAME) {
throw new Error('User feedback has not been activated for this platform/environment');
}

const environment = rootGetters.appEnvironment;
const platform = import.meta.env.VITE_APP;
const platform = import.meta.env.PACKAGE_NAME;

const metaRef = doc(collection(firestore, 'meta'), 'stats');
return runTransaction(firestore, (transaction) => {
Expand Down
1 change: 1 addition & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const nodeModuleDir = path.resolve(__dirname, './node_modules');
export default defineConfig({
define: {
'import.meta.env.PACKAGE_VERSION': JSON.stringify(process.env.npm_package_version),
'import.meta.env.PACKAGE_NAME': JSON.stringify(process.env.npm_package_name),
},
resolve: {
alias: {
Expand Down
Loading