Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
e9d58ead
Commit
e9d58ead
authored
Nov 02, 2012
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mark version as devel
parent
e3bec270
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
weblate/__init__.py
weblate/__init__.py
+16
-0
No files found.
weblate/__init__.py
View file @
e9d58ead
...
...
@@ -21,19 +21,35 @@
import
os
def
get_root_dir
():
'''
Returns Weblate root dir.
'''
curdir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
return
os
.
path
.
abspath
(
os
.
path
.
join
(
curdir
,
'..'
))
def
is_running_git
():
'''
Checks whether we're running inside Git checkout.
'''
return
os
.
path
.
exists
(
os
.
path
.
join
(
get_root_dir
(),
'.git'
))
# Weblate version
VERSION
=
'1.3'
# Are we running git
RUNNING_GIT
=
is_running_git
()
# Grab some information from git
if
RUNNING_GIT
:
import
git
# Describe current checkout
GIT_VERSION
=
git
.
Repo
(
get_root_dir
()).
git
.
describe
()
# Check if we're close to release tag
parts
=
GIT_VERSION
.
split
(
'-'
)
GIT_RELEASE
=
(
len
(
parts
)
<=
2
or
int
(
parts
[
2
])
<
20
)
del
parts
# Mark version as devel if it is
if
not
GIT_RELEASE
:
VERSION
+=
'-dev'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment