Skip to content

Commit

Permalink
updated release scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
jarikomppa committed Feb 7, 2020
1 parent 376fa92 commit 5a596f3
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 17 deletions.
6 changes: 6 additions & 0 deletions docsrc/makedoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,10 @@
os.remove(file)
os.rmdir("temp")

print("- -- --- -- - Copying release docs to /doc")
shutil.copy(datestring + "/soloud_" + datestring + ".epub", "../doc/soloud.epub")
shutil.copy(datestring + "/soloud_" + datestring + ".mobi", "../doc/soloud.mobi")
shutil.copy(datestring + "/soloud_" + datestring + ".html", "../doc/soloud.html")
shutil.copy(datestring + "/soloud_" + datestring + ".pdf", "../doc/soloud.pdf")

print("- -- --- -- - Done - " + datestring)
74 changes: 57 additions & 17 deletions scripts/makerel.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"bin/audio/rainy_ambience.ogg",
"bin/audio/ted_storm.prg.dump",
"bin/audio/tetsno.ogg",
"bin/audio/delphi_loop.ogg",
"bin/audio/war_loop.ogg",
"bin/audio/windy_ambience.ogg",
"bin/audio/wavformats/ch1.flac",
Expand Down Expand Up @@ -369,7 +370,22 @@
"src/tools/tedsid2dump/tedplay.cpp",
"src/tools/tedsid2dump/tedplay.h",
"src/tools/tedsid2dump/tedsound.cpp",
"src/tools/tedsid2dump/types.h"
"src/tools/tedsid2dump/types.h",
"demos/megademo/annex.cpp",
"demos/megademo/filterfolio.cpp",
"demos/piano/RtMidi.cpp",
"demos/piano/RtMidi.h",
"src/audiosource/noise/soloud_noise.cpp",
"src/audiosource/tedsid/readme.txt",
"src/backend/jack/soloud_jack.cpp",
"src/backend/miniaudio/miniaudio.h",
"src/backend/miniaudio/soloud_miniaudio.cpp",
"src/backend/nosound/soloud_nosound.cpp",
"src/core/soloud_misc.cpp",
"src/filter/soloud_freeverbfilter.cpp",
"include/soloud_freeverbfilter.h",
"include/soloud_misc.h",
"include/soloud_noise.h"
]

notfound = []
Expand All @@ -386,6 +402,17 @@ def missingfiles(globpath):
notfound.append(x)
else:
missingfiles(x+"/*")

def missingsources(globpath):
global notfound
for x in glob.glob(globpath):
if os.path.isfile(x):
if x[-4:] not in [".bak", ".pyc", ".dll"] :
x=x.replace('\\','/')
if x[len(root):] not in sources:
notfound.append(x)
else:
missingsources(x+"/*")


def checkfile(findstring, fname):
Expand Down Expand Up @@ -426,32 +453,29 @@ def agecheck(fname):

print("All listed files exist.")

#
# Check that all of the listed assets are referenced in demos
#
#
# Verify that there are no new assets that are referenced in the demos
# but not listed for release
#

missingsources(root+"demos/*")
missingsources(root+"include/*")
missingsources(root+"src/audiosource/*")
missingsources(root+"src/backend/*")
missingsources(root+"src/core/*")
missingsources(root+"src/filter/*")

for x in sources:
if "bin/audio" in x or "bin/graphics" in x:
checkuse(x[x.rfind("/")+1:])

if len(notfound) > 0:
print("Data files not found in any of the demo sources:")
print("Source files/directories found, but not in the list; edit makerel.py or remove them:")
for x in notfound:
print(x)
exit()

print("All listed assets can be found in at least one demo source.")

#
# Verify that there are no new assets that are referenced in the demos
# but not listed for release
#

missingfiles(root+"bin/audio/*")
missingfiles(root+"bin/graphics/*")

if len(notfound) > 0:
print("Data files found in directory and sources, but not in the list:")
print("Data files found in directory and source files, but not in the list:")
for x in notfound:
print(x)
exit()
Expand All @@ -474,6 +498,22 @@ def agecheck(fname):

print("All prebuilt binaries are fresh enough.")

#
# Check that all of the listed assets are referenced in demos
#

for x in sources:
if "bin/audio" in x or "bin/graphics" in x:
checkuse(x[x.rfind("/")+1:])

if len(notfound) > 0:
print("Data files not found in any of the demo sources:")
for x in notfound:
print(x)
exit()

print("All listed assets can be found in at least one demo source.")

#
# Target directory
#
Expand Down

0 comments on commit 5a596f3

Please sign in to comment.