mirror of
https://github.com/plausible/analytics.git
synced 2024-12-22 09:01:40 +03:00
Add version file directly to priv
This commit is contained in:
parent
d23f7d5358
commit
47fc09bacf
1
.gitignore
vendored
1
.gitignore
vendored
@ -36,6 +36,7 @@ npm-debug.log
|
|||||||
# we ignore priv/static. You may want to comment
|
# we ignore priv/static. You may want to comment
|
||||||
# this depending on your deployment strategy.
|
# this depending on your deployment strategy.
|
||||||
/priv/static/
|
/priv/static/
|
||||||
|
/priv/version.json
|
||||||
|
|
||||||
# Files matching config/*.secret.exs pattern contain sensitive
|
# Files matching config/*.secret.exs pattern contain sensitive
|
||||||
# data and you should not commit them into version control.
|
# data and you should not commit them into version control.
|
||||||
|
@ -1 +0,0 @@
|
|||||||
{"version": "v1.5.0", "commit": "db27aa48bb49ca49659ec529a26398a73b7b083f"}
|
|
@ -56,7 +56,7 @@ defmodule PlausibleWeb.Api.ExternalController do
|
|||||||
end
|
end
|
||||||
|
|
||||||
def info(conn, _params) do
|
def info(conn, _params) do
|
||||||
version_file = Application.app_dir(:plausible, "priv/static/version.json")
|
version_file = Application.app_dir(:plausible, "priv/version.json")
|
||||||
|
|
||||||
version =
|
version =
|
||||||
with {:ok, file} <- File.read(version_file),
|
with {:ok, file} <- File.read(version_file),
|
||||||
|
@ -10,9 +10,9 @@ fi
|
|||||||
|
|
||||||
if [ "$GITHUB_WORKSPACE" != "" ]
|
if [ "$GITHUB_WORKSPACE" != "" ]
|
||||||
then
|
then
|
||||||
TARGET_FOLDER=$GITHUB_WORKSPACE/assets/static
|
TARGET_FOLDER=$GITHUB_WORKSPACE/priv
|
||||||
else
|
else
|
||||||
TARGET_FOLDER=$(pwd)/assets/static
|
TARGET_FOLDER=$(pwd)/priv
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "{\"version\": \"$VERSION\", \"commit\": \"$COMMIT\"}" > $TARGET_FOLDER/version.json
|
echo "{\"version\": \"$VERSION\", \"commit\": \"$COMMIT\"}" > $TARGET_FOLDER/version.json
|
||||||
|
Loading…
Reference in New Issue
Block a user