Skip to content

Commit

Permalink
Update package_etw.bat to put version number in .zip files
Browse files Browse the repository at this point in the history
The subject says it all.
  • Loading branch information
randomascii committed Feb 28, 2017
1 parent 0814142 commit 8c93010
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ flamegraph.txt

#Created by package_etw.bat
etwpackage/
etwpackage.zip
etwsymbols.zip
etwpackage*.zip
etwsymbols*.zip
sourceindex.txt

Debug/
Expand Down
4 changes: 3 additions & 1 deletion package_etw.bat
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,14 @@ powershell ..\GitHub-Source-Indexer\github-sourceindexer.ps1 -symbolsFolder etws
@echo %temp%\srcsrv\pdbstr -r -p:etwsymbols\UIforETWStatic_devrel32.pdb -s:srcsrv
:NoSourceIndexing

del *.zip 2>nul
call python make_zip_file.py etwpackage.zip etwpackage
@echo on
call python make_zip_file.py etwsymbols.zip etwsymbols
call python rename_to_version.py UIforETW\Version.h
@echo on

@echo Now upload the new etwpackage.zip and etwsymbols.zip
@echo Now upload the new etwpackage*.zip and etwsymbols*.zip
@echo But make sure that the PersistedPresets section from startup10.wpaProfile
@echo been deleted to avoid shipping modified presets and bloating the file.
@exit /b
Expand Down
14 changes: 14 additions & 0 deletions rename_to_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import os
import sys

prefix = 'const float kCurrentVersion = '

version_header = sys.argv[1]
for line in open(version_header).readlines():
if line.startswith(prefix):
version = line[len(prefix) : len(prefix) + 4]
print 'Renaming zip files to version "%s"' % version
os.rename('etwpackage.zip', 'etwpackage%s.zip' % version)
os.rename('etwsymbols.zip', 'etwsymbols%s.zip' % version)
sys.exit(0)
assert(0)

0 comments on commit 8c93010

Please sign in to comment.