Spaces:
Sleeping
Sleeping
Georg
commited on
Commit
·
c10959e
1
Parent(s):
9df60d3
Prepare job build context
Browse files
deploy.sh
CHANGED
|
@@ -299,6 +299,21 @@ if [ ! -d .git ]; then
|
|
| 299 |
echo ""
|
| 300 |
fi
|
| 301 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 302 |
# Check if there are changes to commit
|
| 303 |
if [[ -n $(git status -s) ]]; then
|
| 304 |
echo "Committing changes..."
|
|
|
|
| 299 |
echo ""
|
| 300 |
fi
|
| 301 |
|
| 302 |
+
# Bump build number to force Space rebuild
|
| 303 |
+
BUILDNUM_FILE="buildnum.txt"
|
| 304 |
+
"${PY_BIN}" - <<'PY'
|
| 305 |
+
from pathlib import Path
|
| 306 |
+
|
| 307 |
+
path = Path("buildnum.txt")
|
| 308 |
+
try:
|
| 309 |
+
current = int(path.read_text().strip())
|
| 310 |
+
except Exception:
|
| 311 |
+
current = 0
|
| 312 |
+
|
| 313 |
+
path.write_text(f"{current + 1}\n")
|
| 314 |
+
print(f"Updated buildnum.txt -> {current + 1}")
|
| 315 |
+
PY
|
| 316 |
+
|
| 317 |
# Check if there are changes to commit
|
| 318 |
if [[ -n $(git status -s) ]]; then
|
| 319 |
echo "Committing changes..."
|