Might be useful for others
I like to be able to see which version/tag my production web2py application
has. Here is how I do it(better ideas are welcome):
In db.py
if not session.gitver:
import os
os.chdir("/path/to/myapp")
os.system('git describe --abbrev=7 --dirty --always --tag
You could also use web2py cache...
:)
Richard
On Fri, Jul 29, 2016 at 12:39 PM, icodk wrote:
> Might be useful for others
> I like to be able to see which version/tag my production web2py
> application has. Here is how I do it(better ideas are welcome):
> In db.py
>
> if not session.gitver:
>
with no expiritation time
On Fri, Jul 29, 2016 at 3:54 PM, Richard Vézina wrote:
> You could also use web2py cache...
>
> :)
>
> Richard
>
> On Fri, Jul 29, 2016 at 12:39 PM, icodk wrote:
>
>> Might be useful for others
>> I like to be able to see which version/tag my production web2py
>> appli
if you just want web2py's version, use
request.global_settings.web2py_version
On Friday, July 29, 2016 at 9:56:43 PM UTC+2, Richard wrote:
>
> with no expiritation time
>
> On Fri, Jul 29, 2016 at 3:54 PM, Richard Vézina > wrote:
>
>> You could also use web2py cache...
>>
>> :)
>>
>> Richard
>>
Thanks for the tip Niphold(I didn't know that)
On Wednesday, August 3, 2016 at 10:37:15 PM UTC+2, Niphlod wrote:
>
> if you just want web2py's version, use
> request.global_settings.web2py_version
>
> On Friday, July 29, 2016 at 9:56:43 PM UTC+2, Richard wrote:
>>
>> with no expiritation time
>>
np. and BTW, never ever ever use chdir, NOR os.system (nor everything
starting a different process) in an app served via web. EVER.
On Thursday, August 4, 2016 at 9:04:48 AM UTC+2, icodk wrote:
>
> Thanks for the tip Niphold(I didn't know that)
>
> On Wednesday, August 3, 2016 at 10:37:15 PM UTC+
OK
What about removing the os.chdir("/path/to/myapp")
and instead adding the path to the git command:
os.system('git -C /path/to/myapp describe --abbrev=7 --dirty --always --tags >
git_ver.txt')
session.gitver = open('/path/to/myapp/git_ver.txt').read()
On Monday, August 8, 2016 at 10:43:
still "breaks" the "don't launch any external processes in a web app" dogma
:-P
On Tuesday, August 9, 2016 at 12:02:35 AM UTC+2, icodk wrote:
>
> OK
> What about removing the os.chdir("/path/to/myapp")
>
> and instead adding the path to the git command:
>
> os.system('git -C /path/to/myapp desc
8 matches
Mail list logo