修改makefile bug

This commit is contained in:
2023-11-12 10:20:11 +08:00
parent 9e7ad17ea2
commit 275379e4ba
4 changed files with 20 additions and 10 deletions

View File

@@ -0,0 +1,7 @@
#!/bin/bash
# 读取程序版本号
cd `dirname $0`
export PROGRAMVERSION=`python3 GetProgramVersion.py`
export SIZE=`du /tmp/spark-deepin-wine-runner-builder/ | tail -n1 | awk '{print $1}'`
sed -i "s%@@VERSION@@%$PROGRAMVERSION%g" /tmp/spark-deepin-wine-runner-builder/DEBIAN/control
sed -i "s%@@SIZE@@%$SIZE%g" /tmp/spark-deepin-wine-runner-builder/DEBIAN/control

10
builddeb/GetProgramVersion.py Executable file
View File

@@ -0,0 +1,10 @@
#!/usr/bin/env python3
# 读取程序版本号
import os
import json
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
try:
with open(f"{programPath}/../information.json") as file:
print(json.loads(file.read())["Version"])
except:
print("1.0.0")