diff --git a/conf/version.py b/conf/version.py new file mode 100644 index 0000000..f2442f2 --- /dev/null +++ b/conf/version.py @@ -0,0 +1,2 @@ +VERSION_NUMBER = "__VERSION__" +BUILD_REF = "" \ No newline at end of file diff --git a/scripts/install b/scripts/install index b8e7c4c..1ff2c2f 100755 --- a/scripts/install +++ b/scripts/install @@ -132,6 +132,12 @@ ynh_add_config --template=".env.template" --destination="$final_path/.env" chmod 400 "$final_path/.env" chown $app:$app "$final_path/.env" +version=$(ynh_app_upstream_version) + +ynh_add_config --template="version.py" --destination="$final_path/recipes/version.py" +chmod 400 "$final_path/recipes/version.py" +chown $app:$app "$final_path/recipes/version.py" + #================================================= # SPECIFIC SETUP #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 52d3ab8..358012f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -128,6 +128,12 @@ ynh_add_config --template=".env.template" --destination="$final_path/.env" chmod 400 "$final_path/.env" chown $app:$app "$final_path/.env" +version=$(ynh_app_upstream_version) + +ynh_add_config --template="version.py" --destination="$final_path/recipes/version.py" +chmod 400 "$final_path/recipes/version.py" +chown $app:$app "$final_path/recipes/version.py" + #================================================= # SPECIFIC UPGRADE #=================================================