mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-13 05:53:06 +01:00
handle build version for ci builds
This commit is contained in:
12
post.py
12
post.py
@@ -63,17 +63,17 @@ def post(source,target,env):
|
||||
for f in glob.glob(os.path.join(outdir,base+"*.bin")):
|
||||
print("removing old file %s"%f)
|
||||
os.unlink(f)
|
||||
ofversion=''
|
||||
if not version.startswith('dev'):
|
||||
ofversion="-"+version
|
||||
versionedFile=os.path.join(outdir,"%s%s-update.bin"%(base,ofversion))
|
||||
shutil.copyfile(firmware,versionedFile)
|
||||
outfile=os.path.join(outdir,"%s%s-all.bin"%(base,ofversion))
|
||||
outfile=os.path.join(outdir,"%s-all.bin"%(base))
|
||||
cmd=[python,esptool,"--chip",chip,"merge_bin","--target-offset",offset,"-o",outfile]
|
||||
cmd+=uploadfiles
|
||||
cmd+=[appoffset,firmware]
|
||||
print("running %s"%" ".join(cmd))
|
||||
env.Execute(" ".join(cmd),"#testpost")
|
||||
ofversion="-"+version
|
||||
versionedFile=os.path.join(outdir,"%s%s-update.bin"%(base,ofversion))
|
||||
shutil.copyfile(firmware,versionedFile)
|
||||
versioneOutFile=os.path.join(outdir,"%s%s-all.bin"%(base,ofversion))
|
||||
shutil.copyfile(outfile,versioneOutFile)
|
||||
env.AddPostAction(
|
||||
"$BUILD_DIR/${PROGNAME}.bin",
|
||||
post
|
||||
|
||||
Reference in New Issue
Block a user