Compare commits

..

No commits in common. "37f42468ba295b42f4cd636fb31d8eacbd2703ab" and "e842d2ec3d8f358eed443be2ecbecb2f3b4137d0" have entirely different histories.

2 changed files with 19 additions and 15 deletions

View File

@ -75,9 +75,10 @@ if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}
rm -rf /opt/dashy
mkdir -p /opt/dashy
wget -qO- https://github.com/Lissy93/dashy/archive/refs/tags/${RELEASE}.tar.gz | tar -xz -C /opt/dashy --strip-components=1
sed -i 's/NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build/NODE_OPTIONS=yarn vue-cli-service build/' /opt/dashy/package.json
cd /opt/dashy
npm install &>/dev/null
npm run build &>/dev/null
yarn &>/dev/null
yarn build &>/dev/null
echo "${RELEASE}" >/opt/${APP}_version.txt
msg_ok "Updated ${APP} to ${RELEASE}"

View File

@ -17,27 +17,30 @@ msg_info "Installing Dependencies"
$STD apt-get install -y curl
$STD apt-get install -y sudo
$STD apt-get install -y mc
$STD apt-get install -y gpg
msg_ok "Installed Dependencies"
msg_info "Setting up Node.js Repository"
mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list
msg_ok "Set up Node.js Repository"
msg_info "Installing Node.js"
$STD apt-get update
$STD apt-get install -y nodejs
msg_info "Installing Node.js (Patience)"
$STD apt-get install -y npm
$STD npm cache clean -f
$STD npm install -g n
$STD n 16.20.1
$STD npm install -g pnpm
ln -sf /usr/local/bin/node /usr/bin/node
msg_ok "Installed Node.js"
msg_info "Installing Yarn"
$STD npm install -g yarn
ln -sf /usr/local/bin/yarn /usr/bin/yarn
msg_ok "Installed Yarn"
RELEASE=$(curl -s https://api.github.com/repos/Lissy93/dashy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
msg_info "Installing Dashy ${RELEASE} (Patience)"
mkdir -p /opt/dashy
wget -qO- https://github.com/Lissy93/dashy/archive/refs/tags/${RELEASE}.tar.gz | tar -xz -C /opt/dashy --strip-components=1
cd /opt/dashy
$STD npm install
$STD npm run build
sed -i 's/NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build/NODE_OPTIONS=yarn vue-cli-service build/' /opt/dashy/package.json
$STD yarn
$STD yarn build
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
msg_ok "Installed Dashy ${RELEASE}"
@ -49,7 +52,7 @@ Description=dashy
[Service]
Type=simple
WorkingDirectory=/opt/dashy
ExecStart=/usr/bin/npm start
ExecStart=/usr/bin/yarn start
[Install]
WantedBy=multi-user.target
EOF