File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,15 @@ function update_script() {
3535 echo " Installed NPM..."
3636 fi
3737 fi
38+ # ensure that jq is installed
39+ if ! command -v jq & > /dev/null; then
40+ $STD msg_info " Installing jq..."
41+ $STD apt-get update -qq & > /dev/null
42+ $STD apt-get install -y jq & > /dev/null || {
43+ msg_error " Failed to install jq"
44+ exit
45+ }
46+ fi
3847 LOCAL_IP=$( hostname -I | awk ' {print $1}' )
3948 RELEASE=$( curl -fsSL https://api.github.com/repos/gethomepage/homepage/releases/latest | grep " tag_name" | awk ' {print substr($2, 3, length($2)-4) }' )
4049 if [[ " ${RELEASE} " != " $( cat /opt/${APP} _version.txt) " ]] || [[ ! -f /opt/${APP} _version.txt ]]; then
@@ -50,6 +59,7 @@ function update_script() {
5059 $STD npx --yes update-browserslist-db@latest
5160 export NEXT_PUBLIC_VERSION=" v$RELEASE "
5261 export NEXT_PUBLIC_REVISION=" source"
62+ export NEXT_PUBLIC_BUILDTIME=$( curl -fsSL https://api.github.com/repos/gethomepage/homepage/releases/latest | jq -r ' .published_at' )
5363 export NEXT_TELEMETRY_DISABLED=1
5464 $STD pnpm build
5565 if [[ ! -f /opt/homepage/.env ]]; then
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ network_check
1414update_os
1515
1616msg_info " Installing Dependencies"
17- $STD apt-get install -y gpg
17+ $STD apt-get install -y gpg jq
1818msg_ok " Installed Dependencies"
1919
2020msg_info " Setting up Node.js Repository"
@@ -43,6 +43,7 @@ cp /opt/homepage/src/skeleton/* /opt/homepage/config
4343$STD pnpm install
4444export NEXT_PUBLIC_VERSION=" v$RELEASE "
4545export NEXT_PUBLIC_REVISION=" source"
46+ export NEXT_PUBLIC_BUILDTIME=$( curl -fsSL https://api.github.com/repos/gethomepage/homepage/releases/latest | jq -r ' .published_at' )
4647export NEXT_TELEMETRY_DISABLED=1
4748$STD pnpm build
4849echo " HOMEPAGE_ALLOWED_HOSTS=localhost:3000,${LOCAL_IP} :3000" > /opt/homepage/.env
You can’t perform that action at this time.
0 commit comments