Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.
TypeScript analyticsanalytics-dashboardclickhouseelixirgoogle-analyticsmarketingopen-source-analyticsphoenixplausible-analyticspostgresqlprivacyprivacy-friendlyself-hostedsimple-analyticsstatisticstailwindcssweb-analyticswebsite-analyticswebsite-statswebsite-tracking
Add version file directly to priv
Uku Taht47fc09bacf6b
diff --git a/.gitignore b/.gitignoreindex a11241bbab..874ac41c67 100644--- a/.gitignore+++ b/.gitignore@@ -36,6 +36,7 @@ npm-debug.log# we ignore priv/static. You may want to comment# this depending on your deployment strategy./priv/static/+/priv/version.json# Files matching config/*.secret.exs pattern contain sensitive# data and you should not commit them into version control.diff --git a/assets/static/version.json b/assets/static/version.jsondeleted file mode 100644index 59c4029967..0000000000--- a/assets/static/version.json+++ /dev/null@@ -1 +0,0 @@-{"version": "v1.5.0", "commit": "db27aa48bb49ca49659ec529a26398a73b7b083f"}diff --git a/lib/plausible_web/controllers/api/external_controller.ex b/lib/plausible_web/controllers/api/external_controller.exindex 070d776307..543e644a57 100644--- a/lib/plausible_web/controllers/api/external_controller.ex+++ b/lib/plausible_web/controllers/api/external_controller.ex@@ -56,7 +56,7 @@ defmodule PlausibleWeb.Api.ExternalController doenddef info(conn, _params) do- version_file = Application.app_dir(:plausible, "priv/static/version.json")+ version_file = Application.app_dir(:plausible, "priv/version.json")version =with {:ok, file} <- File.read(version_file),diff --git a/rel/prepare_release.sh b/rel/prepare_release.shindex 924633730c..77ee6a0cee 100755--- a/rel/prepare_release.sh+++ b/rel/prepare_release.sh@@ -10,9 +10,9 @@ fiif [ "$GITHUB_WORKSPACE" != "" ]then- TARGET_FOLDER=$GITHUB_WORKSPACE/assets/static+ TARGET_FOLDER=$GITHUB_WORKSPACE/privelse- TARGET_FOLDER=$(pwd)/assets/static+ TARGET_FOLDER=$(pwd)/privfiecho "{\"version\": \"$VERSION\", \"commit\": \"$COMMIT\"}" > $TARGET_FOLDER/version.json