Refactor update_script function to streamline update process and ensure version tracking
This commit is contained in:
parent
552959a39b
commit
e3718d5c63
@ -50,17 +50,17 @@ function update_script() {
|
|||||||
unzip -q "${RELEASE}.zip"
|
unzip -q "${RELEASE}.zip"
|
||||||
rm -rf /opt/Guardian
|
rm -rf /opt/Guardian
|
||||||
mv "Guardian-${RELEASE}/" "/opt/Guardian"
|
mv "Guardian-${RELEASE}/" "/opt/Guardian"
|
||||||
|
|
||||||
# Build Backend
|
# Build Backend
|
||||||
cd /opt/Guardian/backend
|
cd /opt/Guardian/backend
|
||||||
npm ci
|
npm ci
|
||||||
npm run build
|
npm run build
|
||||||
|
|
||||||
# Build Frontend
|
# Build Frontend
|
||||||
cd /opt/Guardian/frontend
|
cd /opt/Guardian/frontend
|
||||||
npm ci
|
npm ci
|
||||||
npm run build
|
npm run build
|
||||||
|
|
||||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||||
msg_ok "Updated $APP to v${RELEASE}"
|
msg_ok "Updated $APP to v${RELEASE}"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user