Switch to using separate untracked build.py.
This commit is contained in:
parent
d511f1774d
commit
2b138607fd
6 changed files with 11 additions and 10 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -21,6 +21,7 @@ build/build/BAPSicle/
|
|||
|
||||
build/output/
|
||||
|
||||
build.py
|
||||
|
||||
venv/
|
||||
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
cd "$(dirname "$0")"
|
||||
|
||||
build_commit="$(git rev-parse --short HEAD)"
|
||||
echo "$build_commit"
|
||||
sed -i "s/BUILD_COMMIT/$build_commit/" ../config.py
|
||||
echo "BUILD: str = \"$build_commit\"" > ../build.py
|
||||
|
||||
apt install libportaudio2
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
cd "$(dirname "$0")"
|
||||
|
||||
build_commit="$(git rev-parse --short HEAD)"
|
||||
echo "$build_commit"
|
||||
echo "BUILD: str = \"$build_commit\"" > ../build.py
|
||||
sed -i '' -e "s/BUILD_COMMIT/$build_commit/" "../config.py"
|
||||
|
||||
python3 -m venv ../venv
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
cd /D "%~dp0"
|
||||
|
||||
: Get the git commit and write it into config.py.
|
||||
: Get the git commit and write it into build.py.
|
||||
FOR /F "tokens=* USEBACKQ" %%F IN (`git rev-parse --short HEAD`) DO (
|
||||
SET build_commit=%%F
|
||||
)
|
||||
|
||||
(Get-Content "..\config.py") -replace 'BUILD_COMMIT', '%build_commit%' | Out-File -encoding ASCII "..\config.py"
|
||||
echo "BUILD: str = \"%build_commit%\""> ..\build.py
|
||||
|
||||
py -m venv ..\venv
|
||||
..\venv\Scripts\activate
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
# BAPSicle Details
|
||||
VERSION: str = "0.1.0"
|
||||
BUILD: str = "2bc61be"
|
||||
|
|
|
@ -34,6 +34,9 @@ if not isMacOS():
|
|||
# Rip, this doesn't like threading on MacOS.
|
||||
import pyttsx3
|
||||
|
||||
if isBundelled():
|
||||
import build
|
||||
|
||||
import config
|
||||
from typing import Dict, List
|
||||
from helpers.state_manager import StateManager
|
||||
|
@ -56,8 +59,8 @@ class BAPSicleServer:
|
|||
|
||||
|
||||
default_state = {
|
||||
"server_version": config.VERSION,
|
||||
"server_build": config.BUILD,
|
||||
"server_version": "",
|
||||
"server_build": "",
|
||||
"server_name": "URY BAPSicle",
|
||||
"host": "localhost",
|
||||
"port": 13500,
|
||||
|
@ -512,7 +515,7 @@ def startServer():
|
|||
# TODO: Check these match, if not, trigger any upgrade noticies / welcome
|
||||
state.update("server_version", config.VERSION)
|
||||
if isBundelled():
|
||||
build = config.BUILD
|
||||
build = build.BUILD
|
||||
else:
|
||||
build = "Dev"
|
||||
state.update("server_build", build)
|
||||
|
|
Loading…
Reference in a new issue