Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
cerbere
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
8
Issues
8
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cerbere
cerbere
Commits
26cdb43c
Commit
26cdb43c
authored
Feb 08, 2016
by
Sylvain Herlédan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update build version each time code is modified and versioned.
parent
38074385
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
.gitignore
.gitignore
+2
-0
setup.py
setup.py
+15
-1
No files found.
.gitignore
View file @
26cdb43c
...
...
@@ -39,6 +39,8 @@ nosetests.xml
DS_Store
*.sqlite3
VERSION.txt
migrations
*/migrations/*.py
...
...
setup.py
View file @
26cdb43c
...
...
@@ -30,10 +30,24 @@ except subprocess.CalledProcessError:
with
open
(
"CONTRIBUTORS.txt"
,
"r"
)
as
f
:
authors_email
=
', '
.
join
(
f
.
readlines
())
# Update version when there is a new git commit
major_minor_version
=
'0.1'
package_dir
=
os
.
path
.
dirname
(
__file__
)
version_path
=
os
.
path
.
join
(
package_dir
,
'VERSION.txt'
)
if
os
.
path
.
exists
(
'.git'
)
and
os
.
path
.
isdir
(
'.git'
):
commits
=
subprocess
.
check_output
([
'/usr/bin/git'
,
'rev-list'
,
'HEAD'
,
'--count'
])
.
decode
(
'utf-8'
)
.
strip
()
with
open
(
version_path
,
'w'
)
as
f
:
f
.
write
(
'{}.{}
\n
'
.
format
(
major_minor_version
,
commits
))
with
open
(
version_path
,
'r'
)
as
f
:
version
=
f
.
read
()
setup
(
name
=
"cerbere"
,
version
=
"0.1.1"
,
version
=
version
,
author
=
"Felyx Project Collaborators:
%
s"
%
authors_email
,
author_email
=
"jean.francois.piolle@ifremer.fr"
,
description
=
""
,
...
...
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