[web2py] display git version of my own web2py project

2016-07-29 Thread icodk
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

Re: [web2py] display git version of my own web2py project

2016-07-29 Thread Richard Vézina
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: >

Re: [web2py] display git version of my own web2py project

2016-07-29 Thread Richard Vézina
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

Re: [web2py] display git version of my own web2py project

2016-08-03 Thread Niphlod
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 >>

Re: [web2py] display git version of my own web2py project

2016-08-04 Thread icodk
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 >>

Re: [web2py] display git version of my own web2py project

2016-08-08 Thread Niphlod
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+

Re: [web2py] display git version of my own web2py project

2016-08-08 Thread icodk
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:

Re: [web2py] display git version of my own web2py project

2016-08-08 Thread Niphlod
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