mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
--version-note for datasette, datasette publish and datasette package
This is a relatively obscure new command-line argument that helps solve the
problem of showing accurate version information in deployed instances of
Datasette even if they were deployed directly from source code.
You can pass --version-note to datasette publish and package and it will then
in turn be passed to datasette when it starts:
datasette --version-note=hello fixtures.db
Now if you visit /-/versions.json you will see this:
{
"datasette": {
"note": "hello",
"version": "0+unknown"
},
"python": {
"full": "3.6.5 (default, Jun 6 2018, 19:19:24) \n[GCC 6.3.0 20170516]",
"version": "3.6.5"
},
...
}
I plan to use this in some Travis CI configuration, refs #313
This commit is contained in:
parent
538565de3a
commit
db1e6bc182
5 changed files with 24 additions and 3 deletions
|
|
@ -252,6 +252,7 @@ def test_temporary_docker_directory_uses_hard_link():
|
|||
static=[],
|
||||
install=[],
|
||||
spatialite=False,
|
||||
version_note=None,
|
||||
) as temp_docker:
|
||||
hello = os.path.join(temp_docker, 'hello')
|
||||
assert 'world' == open(hello).read()
|
||||
|
|
@ -278,6 +279,7 @@ def test_temporary_docker_directory_uses_copy_if_hard_link_fails(mock_link):
|
|||
static=[],
|
||||
install=[],
|
||||
spatialite=False,
|
||||
version_note=None,
|
||||
) as temp_docker:
|
||||
hello = os.path.join(temp_docker, 'hello')
|
||||
assert 'world' == open(hello).read()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue