Switch back to local file backups for operation instead of curl

This commit is contained in:
Jesse Antoszyk 2024-10-22 20:48:36 -04:00
parent b114aa4012
commit daa7bfbf70
1 changed files with 4 additions and 12 deletions

View File

@ -114,8 +114,8 @@ $STD rm ghostfolio-$GHOSTFOLIO_VERSION.tgz
cd /opt/ghostfolio-$GHOSTFOLIO_VERSION cd /opt/ghostfolio-$GHOSTFOLIO_VERSION
# Stash these so we have clean versions later # Stash these so we have clean versions later
#cp /opt/ghostfolio-$GHOSTFOLIO_VERSION/package.json /opt/ghostfolio-$GHOSTFOLIO_VERSION/package.json.bak cp /opt/ghostfolio-$GHOSTFOLIO_VERSION/package.json /opt/package.json.bak
#cp /opt/ghostfolio-$GHOSTFOLIO_VERSION/package-lock.json /opt/ghostfolio-$GHOSTFOLIO_VERSION/package-lock.json.bak cp /opt/ghostfolio-$GHOSTFOLIO_VERSION/package-lock.json /opt/package-lock.json.bak
# Get node version and install node # Get node version and install node
test -f .nvmrc && NODE_VERSION=$(sed 's/^v\([0-9]*\)[.]*.*/\1/g' .nvmrc) # get first digits after an v, excluding potential .minor.patch versions test -f .nvmrc && NODE_VERSION=$(sed 's/^v\([0-9]*\)[.]*.*/\1/g' .nvmrc) # get first digits after an v, excluding potential .minor.patch versions
@ -130,16 +130,14 @@ $STD npm install
$STD npm run build:production $STD npm run build:production
# package.json was generated by the build process, however the original package-lock.json needs to be used to ensure the same versions # package.json was generated by the build process, however the original package-lock.json needs to be used to ensure the same versions
# mv /opt/ghostfolio-$GHOSTFOLIO_VERSION/package-lock.json.bak /opt/ghostfolio-$GHOSTFOLIO_VERSION/dist/apps/api/package-lock.json mv /opt/package-lock.json.bak /opt/ghostfolio-$GHOSTFOLIO_VERSION/package-lock.json
$STD curl -o package-lock.json https://raw.githubusercontent.com/ghostfolio/ghostfolio/refs/tags/$GHOSTFOLIO_VERSION/package-lock.json
cd /opt/ghostfolio-$GHOSTFOLIO_VERSION/dist/apps/api/ cd /opt/ghostfolio-$GHOSTFOLIO_VERSION/dist/apps/api/
$STD npm install $STD npm install
cp -r /opt/ghostfolio-$GHOSTFOLIO_VERSION/prisma . cp -r /opt/ghostfolio-$GHOSTFOLIO_VERSION/prisma .
# Overwrite the generated package.json with the original one to ensure having all the scripts # Overwrite the generated package.json with the original one to ensure having all the scripts
# mv /opt/ghostfolio-$GHOSTFOLIO_VERSION/package.json.bak /opt/ghostfolio-$GHOSTFOLIO_VERSION/dist/apps/api/package.json mv /opt/package.json.bak /opt/ghostfolio-$GHOSTFOLIO_VERSION/dist/apps/api/package.json
$STD curl -o package.json https://raw.githubusercontent.com/ghostfolio/ghostfolio/refs/tags/$GHOSTFOLIO_VERSION/package.json
$STD npm run database:generate-typings $STD npm run database:generate-typings
# Move the built project to /opt/ghostfolio # Move the built project to /opt/ghostfolio
@ -221,9 +219,3 @@ msg_ok "Created Startup Scripts"
motd_ssh motd_ssh
customize customize
# msg_info "Cleaning up"
# apt remove -y make git g++
# $STD apt-get -y autoremove
# $STD apt-get -y autoclean
# msg_ok "Cleaned"