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 rm -rf /opt/dashy
mkdir -p /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 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 cd /opt/dashy
npm install &>/dev/null yarn &>/dev/null
npm run build &>/dev/null yarn build &>/dev/null
echo "${RELEASE}" >/opt/${APP}_version.txt echo "${RELEASE}" >/opt/${APP}_version.txt
msg_ok "Updated ${APP} to ${RELEASE}" 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 curl
$STD apt-get install -y sudo $STD apt-get install -y sudo
$STD apt-get install -y mc $STD apt-get install -y mc
$STD apt-get install -y gpg
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
msg_info "Setting up Node.js Repository" msg_info "Installing Node.js (Patience)"
mkdir -p /etc/apt/keyrings $STD apt-get install -y npm
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg $STD npm cache clean -f
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 $STD npm install -g n
msg_ok "Set up Node.js Repository" $STD n 16.20.1
$STD npm install -g pnpm
msg_info "Installing Node.js" ln -sf /usr/local/bin/node /usr/bin/node
$STD apt-get update
$STD apt-get install -y nodejs
msg_ok "Installed Node.js" 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) }') 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)" msg_info "Installing Dashy ${RELEASE} (Patience)"
mkdir -p /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 wget -qO- https://github.com/Lissy93/dashy/archive/refs/tags/${RELEASE}.tar.gz | tar -xz -C /opt/dashy --strip-components=1
cd /opt/dashy cd /opt/dashy
$STD npm install sed -i 's/NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build/NODE_OPTIONS=yarn vue-cli-service build/' /opt/dashy/package.json
$STD npm run build $STD yarn
$STD yarn build
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
msg_ok "Installed Dashy ${RELEASE}" msg_ok "Installed Dashy ${RELEASE}"
@ -49,7 +52,7 @@ Description=dashy
[Service] [Service]
Type=simple Type=simple
WorkingDirectory=/opt/dashy WorkingDirectory=/opt/dashy
ExecStart=/usr/bin/npm start ExecStart=/usr/bin/yarn start
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
EOF EOF