mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-06 14:48:02 -05:00
version script test
This commit is contained in:
7
.github/workflows/docker-publish-dev.yml
vendored
7
.github/workflows/docker-publish-dev.yml
vendored
@@ -10,6 +10,13 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@master
|
||||||
|
- uses: DamianReeves/write-file-action
|
||||||
|
with:
|
||||||
|
path: version.py
|
||||||
|
contents: |
|
||||||
|
echo "VERSION_NUMBER = 'develop'"
|
||||||
|
echo "BUILD_REF = '$(git rev-parse --short "$GITHUB_SHA")'"
|
||||||
|
write-mode: overwrite
|
||||||
- name: Publish to Registry
|
- name: Publish to Registry
|
||||||
uses: elgohr/Publish-Docker-Github-Action@2.13
|
uses: elgohr/Publish-Docker-Github-Action@2.13
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -16,7 +16,10 @@
|
|||||||
Django Recipes is an open source free software application. It can be found on <a href="https://github.com/vabene1111/recipes">GitHub</a>.
|
Django Recipes is an open source free software application. It can be found on <a href="https://github.com/vabene1111/recipes">GitHub</a>.
|
||||||
Changelogs can be found <a href="https://github.com/vabene1111/recipes/releases">here</a>.
|
Changelogs can be found <a href="https://github.com/vabene1111/recipes/releases">here</a>.
|
||||||
{% endblocktrans %}
|
{% endblocktrans %}
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
Current Version: {{ version }}<br/>
|
||||||
|
Ref: {{ ref }}
|
||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ from cookbook.forms import *
|
|||||||
from cookbook.helper.permission_helper import group_required
|
from cookbook.helper.permission_helper import group_required
|
||||||
from cookbook.tables import RecipeTable, RecipeTableSmall, CookLogTable, ViewLogTable
|
from cookbook.tables import RecipeTable, RecipeTableSmall, CookLogTable, ViewLogTable
|
||||||
|
|
||||||
|
from recipes.version import *
|
||||||
|
|
||||||
|
|
||||||
def index(request):
|
def index(request):
|
||||||
if not request.user.is_authenticated:
|
if not request.user.is_authenticated:
|
||||||
@@ -267,7 +269,8 @@ def history(request):
|
|||||||
@group_required('admin')
|
@group_required('admin')
|
||||||
def system(request):
|
def system(request):
|
||||||
postgres = False if settings.DATABASES['default']['ENGINE'] == 'django.db.backends.postgresql_psycopg2' else True
|
postgres = False if settings.DATABASES['default']['ENGINE'] == 'django.db.backends.postgresql_psycopg2' else True
|
||||||
return render(request, 'system.html', {'gunicorn_media': settings.GUNICORN_MEDIA, 'debug': settings.DEBUG, 'postgres': postgres})
|
|
||||||
|
return render(request, 'system.html', {'gunicorn_media': settings.GUNICORN_MEDIA, 'debug': settings.DEBUG, 'postgres': postgres, 'version': VERSION_NUMBER, 'ref': BUILD_REF})
|
||||||
|
|
||||||
|
|
||||||
def setup(request):
|
def setup(request):
|
||||||
|
|||||||
2
recipes/version.py
Normal file
2
recipes/version.py
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
VERSION_NUMBER = "0.0.0"
|
||||||
|
BUILD_REF = ""
|
||||||
Reference in New Issue
Block a user