From ccea2486e43b24d778642ff74f4f206cafd9d621 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Sun, 17 Mar 2024 16:42:49 -0600 Subject: [PATCH] change build for test servers, bump version to 0.3.1 --- .env.development | 11 ++++++----- README.md | 19 ++++++++++++++++--- package-lock.json | 8 ++++---- package.json | 5 ++--- project.task.yaml | 1 + vue.config.js | 2 ++ 6 files changed, 31 insertions(+), 15 deletions(-) diff --git a/.env.development b/.env.development index 6d39387..12a81f3 100644 --- a/.env.development +++ b/.env.development @@ -1,6 +1,7 @@ -# Only the variables that start with VUE_APP_ are seen in the application process.env in Vue. -# this won't resolve as a URL on production; it's a URN only found in the test system -VUE_APP_BVC_MEETUPS_PROJECT_CLAIM_ID=https://endorser.ch/entity/01HNTZYJJXTGT0EZS3VEJGX7AK -VUE_APP_DEFAULT_ENDORSER_API_SERVER=http://localhost:3000 -VUE_APP_DEFAULT_IMAGE_API_SERVER=http://localhost:3002 +# I tried setting values here and using `vue-cli-service build --mode development` +# but it didn't create some things in "dist": +# - the "css" directory with the CSS extracted from Vue files +# - the sw_scripts-combined* files +# +# ¯\_(ツ)_/¯ diff --git a/README.md b/README.md index 04286a0..f7c4a28 100644 --- a/README.md +++ b/README.md @@ -34,11 +34,24 @@ npm run lint * Update the project.task.yaml & CHANGELOG.md & the version in package.json, run `npm install`. -* If production: change package.json to remove "_Test". Also record what version is on production. +* Record what version is currently on production. -* `npm run build-dev` for test servers or `npm run build` for production. +* Run the correct build -* Get on the server and back up the time-safari folder. + * Production +``` +# This picks up values from .env.production +npm run build +``` + + * Development +``` +# Set test values. (See .env.development for more details.) +# The test BVC_MEETUPS_PROJECT_CLAIM_ID does not resolve as a URL because it's only in the test DB and the prod redirect won't redirect there. +APP_TITLE="TimeSafari_Test" VUE_APP_BVC_MEETUPS_PROJECT_CLAIM_ID=https://endorser.ch/entity/01HNTZYJJXTGT0EZS3VEJGX7AK VUE_APP_DEFAULT_ENDORSER_API_SERVER=http://localhost:3000 VUE_APP_DEFAULT_IMAGE_API_SERVER=http://localhost:3002 npm run build +``` + +* Get on the server and back up the DB and the time-safari folder. * `rsync -azvu -e "ssh -i ~/.ssh/..." dist ubuntutest@test.timesafari.app:time-safari` diff --git a/package-lock.json b/package-lock.json index 9da01fe..63e8596 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { - "name": "TimeSafari_Test", - "version": "0.3.0", + "name": "TimeSafari", + "version": "0.3.1", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "TimeSafari_Test", - "version": "0.3.0", + "name": "TimeSafari", + "version": "0.3.1", "dependencies": { "@dicebear/collection": "^5.3.5", "@dicebear/core": "^5.3.5", diff --git a/package.json b/package.json index 4eb358a..1d64bbb 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,10 @@ { - "name": "TimeSafari_Test", - "version": "0.3.0", + "name": "TimeSafari", + "version": "0.3.1", "private": true, "scripts": { "serve": "vue-cli-service serve", "build": "vue-cli-service build", - "build-dev": "vue-cli-service build --mode development", "lint": "vue-cli-service lint" }, "dependencies": { diff --git a/project.task.yaml b/project.task.yaml index b5ee332..7fbfd55 100644 --- a/project.task.yaml +++ b/project.task.yaml @@ -1,6 +1,7 @@ tasks : +- bug maybe - a new give remembers the previous project - alert & stop if give amount < 0 - onboarding video diff --git a/vue.config.js b/vue.config.js index ea4ea00..499d0e3 100644 --- a/vue.config.js +++ b/vue.config.js @@ -3,6 +3,7 @@ const { gitDescribeSync } = require("git-describe"); const { exec } = require("child_process"); process.env.VUE_APP_GIT_HASH = gitDescribeSync().hash; +const APP_TITLE = process.env.APP_TITLE || require("./package.json").name; module.exports = defineConfig({ transpileDependencies: true, @@ -30,6 +31,7 @@ module.exports = defineConfig({ ], }, pwa: { + name: APP_TITLE, iconPaths: { faviconSVG: "img/icons/safari-pinned-tab.svg", },