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
4491b549
Commit
4491b549
authored
Nov 10, 2015
by
Weblate
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
e9a9fd82
6ebb0707
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
33 deletions
+26
-33
scripts/create-release
scripts/create-release
+10
-1
scripts/set-version
scripts/set-version
+2
-2
weblate/__init__.py
weblate/__init__.py
+14
-30
No files found.
scripts/create-release
View file @
4491b549
...
...
@@ -7,13 +7,22 @@ if [ "x$1" = "x--help" -o "x$1" = "x-h" ] ; then
exit
1
fi
if
!
git diff
--exit-code
--quiet
;
then
echo
"There are not committed changes!"
exit
1
fi
# Grab version
version
=
`
DJANGO_SETTINGS_MODULE
=
weblate.settings_example python
-c
'import weblate; print weblate.VERSION
'
|
sed
's/-dev//
'
`
version
=
`
DJANGO_SETTINGS_MODULE
=
weblate.settings_example python
-c
'import weblate; print weblate.VERSION
_BASE
'
`
namever
=
weblate-
$version
tarver
=
Weblate-
$version
# What are we going to build?
if
[
"x
$1
"
=
"x--tag"
]
;
then
sed
-i
"s/^VERSION =.*/VERSION = '
$version
'/"
weblate/__init__.py
if
!
git diff
--exit-code
--quiet
;
then
git commit
-s
-m
"Releasing
$version
"
--
weblate/__init__.py
fi
rev
=
$namever
git tag
-s
$rev
-m
"Version
$version
"
cd
../weblate-test
...
...
scripts/set-version
View file @
4491b549
...
...
@@ -6,7 +6,7 @@ if [ -z "$1" ] ; then
exit
1
fi
sed
-i
"s/^VERSION =.*/VERSION = '
$1
'/"
weblate/__init__.py
sed
-i
"s/^VERSION =.*/VERSION = '
$1
-dev
'/"
weblate/__init__.py
sed
-i
"s/version =.*/version = '
$1
'/"
docs/conf.py
sed
-i
"s/Version: .*/Version:
$1
/"
weblate.spec
sed
-i
"s/version=.*,/version='
$1
',/"
setup.py
...
...
@@ -27,4 +27,4 @@ EOT
sed
'1D;2D;3D'
>>
docs/changes.rst <
$tmp
rm
$tmp
git commit
-m
"Setting version to
$1
"
weblate/__init__.py docs/conf.py weblate.spec docs/changes.rst setup.py
git commit
-
s
-
m
"Setting version to
$1
"
weblate/__init__.py docs/conf.py weblate.spec docs/changes.rst setup.py
weblate/__init__.py
View file @
4491b549
...
...
@@ -38,44 +38,28 @@ def get_root_dir():
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'
,
'config'
))
# Weblate version
VERSION
=
'2.5'
VERSION
=
'2.5
-dev
'
# Version string without suffix
VERSION_BASE
=
VERSION
VERSION_BASE
=
VERSION
.
replace
(
'-dev'
,
''
)
# User-Agent string to use
USER_AGENT
=
'Weblate/{0}'
.
format
(
VERSION
)
# Are we running git
RUNNING_GIT
=
is_running_git
()
GIT_RELEASE
=
False
GIT_VERSION
=
VERSION
# Grab some information from git
if
RUNNING_GIT
:
try
:
# Describe current checkout
GIT_VERSION
=
GitRepository
(
get_root_dir
()).
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
try
:
# Describe current checkout
GIT_VERSION
=
GitRepository
(
get_root_dir
()).
describe
()
# Mark version as devel if it is
if
not
GIT_RELEASE
:
VERSION
+=
'-dev'
except
(
RepositoryException
,
OSError
):
# Import failed or git has troubles reading
# repo (eg. swallow clone)
RUNNING_GIT
=
False
# Check if we're close to release tag
parts
=
GIT_VERSION
.
split
(
'-'
)
GIT_RELEASE
=
(
len
(
parts
)
<=
2
or
int
(
parts
[
2
])
<
20
)
del
parts
except
(
RepositoryException
,
OSError
):
# Import failed or git has troubles reading
# repo (eg. swallow clone)
GIT_VERSION
=
VERSION
def
get_doc_url
(
page
,
anchor
=
''
):
...
...
@@ -83,7 +67,7 @@ def get_doc_url(page, anchor=''):
Return URL to documentation.
'''
# Should we use tagged release or latest version
if
RUNNING_GIT
and
not
GIT_RELEASE
:
if
'-dev'
in
VERSION
:
version
=
'latest'
else
:
version
=
'weblate-%s'
%
VERSION
...
...
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