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