Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
doxverilog
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
doxverilog
Commits
18a31da3
Commit
18a31da3
authored
Jun 24, 2013
by
Petr Prikryl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winbuild/pack_the_distribution_for_windows.py finalized and cleaned
parent
f0f2959d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
51 deletions
+18
-51
pack_the_distribution_for_windows.py
winbuild/pack_the_distribution_for_windows.py
+18
-51
No files found.
winbuild/pack_the_distribution_for_windows.py
View file @
18a31da3
#! python2
#! python2
from
__future__
import
print_function
...
...
@@ -10,37 +10,6 @@ import sys
import
textwrap
def
getCurrentSubdirName
():
subdir
,
fname
=
os
.
path
.
split
(
os
.
path
.
realpath
(
__file__
))
return
os
.
path
.
basename
(
subdir
)
def
getCurrentBranchName
():
result
=
None
cmd
=
'git branch --list --no-color'
pipe
=
subprocess
.
Popen
(
cmd
,
stdout
=
subprocess
.
PIPE
)
.
stdout
for
line
in
pipe
:
line
=
line
.
decode
(
'utf-8'
)
if
line
.
startswith
(
'*'
):
result
=
line
[
2
:]
.
rstrip
()
pipe
.
close
()
return
result
def
getUserName
():
user
=
None
# init
p
=
subprocess
.
Popen
(
'git config user.name'
,
stdout
=
subprocess
.
PIPE
)
user
=
p
.
communicate
()[
0
]
user
=
user
.
decode
(
'utf-8'
)
p
.
wait
()
return
user
def
getUserInitials
():
user
=
getUserName
()
return
''
.
join
(
s
[
0
]
for
s
in
user
.
split
())
def
gitSHA_date_time
():
cmd
=
'git rev-parse --short HEAD'
p
=
subprocess
.
Popen
(
cmd
,
stdout
=
subprocess
.
PIPE
)
...
...
@@ -62,16 +31,6 @@ def gitSHA_date_time():
return
sha
,
dstamp
,
tstamp
def
gitDescribe
():
result
=
None
cmd
=
'git describe'
p
=
subprocess
.
Popen
(
cmd
,
stdout
=
subprocess
.
PIPE
)
descr
=
p
.
communicate
()[
0
]
descr
=
descr
.
decode
(
'utf-8'
)
p
.
wait
()
return
descr
.
strip
()
def
getDoxygenVersion
():
# ... from the VERSION file.
sdir
,
fname
=
getThisScriptPathAndName
()
...
...
@@ -206,10 +165,15 @@ def buildAndZipTranslatorReport(distr_dir):
os
.
chdir
(
wd
)
# back to the original working directory
def
xxx
():
def
mailto
():
# Vytvoříme dopis.
subject
=
'Windows binaries available for
%
s in SVN'
%
doxdir
# Information for the letter.
ver
=
getDoxygenVersion
()
sha
,
dstamp
,
tstamp
=
gitSHA_date_time
()
doxzipname
=
getBinariesZipBareName
()
trzipname
=
getTranslatorReportZipBareName
()
subject
=
'Windows binaries available for {}-{} at SourceForge'
.
format
(
ver
,
dstamp
)
subject
=
subject
.
replace
(
' '
,
'
%20
'
)
body
=
textwrap
.
dedent
(
'''
\
...
...
@@ -223,7 +187,7 @@ def xxx():
This is the place where you should find also the next
releases. Name of the archive file is
%
s
{}
The related translator report can be found inside the directory
...
...
@@ -231,20 +195,20 @@ def xxx():
Name of the archive file is
%
s
{}
The binaries are NOT created automatically, so it may
happen that some newer
SVN
sources were not compiled
happen that some newer sources were not compiled
because I am not present to do that or I forgot... ;)
Regards,
Petr
--
Petr Prikryl (prikryl at atlas dot cz)'''
)
%
(
doxzipname
,
trzipname
)
Petr Prikryl (prikryl at atlas dot cz)'''
)
.
format
(
doxzipname
,
trzipname
)
body
=
body
.
replace
(
'
\n
'
,
'
%0
d'
)
#
Zkonstruujeme URI a spustíme mailer pro odeslání dopisu
.
#
Make the mailto URI and launch the mailer
.
to_addr
=
'doxygen-users@lists.sourceforge.net'
mailtoURI
=
'mailto:
%
s?subject=
%
s&body=
%
s'
%
(
to_addr
,
subject
,
body
)
os
.
startfile
(
mailtoURI
)
...
...
@@ -263,3 +227,6 @@ if __name__ == '__main__':
# The translator report...
buildAndZipTranslatorReport
(
dist_dir
)
# Launch the mailer with the generated message body.
mailto
()
\ No newline at end of file
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