Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,22 @@ jobs:
run: |
mkdir -p _site
cp -r main-content/* _site/ 2>/dev/null || true
# Inject version into main branch (visual display and JS constant)
sed -i 's|MeshCore Wardrive</h1>|MeshCore Wardrive <span class="text-sm text-slate-400">'"${RELEASE_VERSION}"'</span></h1>|' _site/index.html

# MAIN: inject release version into root site
sed -i 's|<span id="appVersion"[^>]*>[^<]*</span>|<span id="appVersion" class="text-sm text-slate-400">'"${RELEASE_VERSION}"'</span>|' _site/index.html
sed -i 's|const APP_VERSION = "UNKNOWN";|const APP_VERSION = "'"${RELEASE_VERSION}"'";|' _site/content/wardrive.js


# DEV: copy dev site under /dev
mkdir -p _site/dev
cp -r dev-content/* _site/dev/ 2>/dev/null || true
cp -r dev-content/content _site/dev/ 2>/dev/null || true
# Inject DEV version (visual display) and JS constant with DEV-EPOCH format

# DEV: inject DEV-EPOCH
DEV_EPOCH=$(date -u +%s)
# Replace the visible version in the dedicated span (this is what the UI shows)
sed -i 's|<span id="appVersion"[^>]*>[^<]*</span>|<span id="appVersion" class="text-sm text-slate-400">DEV-'"${DEV_EPOCH}"'</span>|' _site/dev/index.html
# Inject into JS constant
sed -i 's|const APP_VERSION = "UNKNOWN";|const APP_VERSION = "DEV-'"${DEV_EPOCH}"'";|' _site/dev/content/wardrive.js

find _site -name ". git" -exec rm -rf {} + 2>/dev/null || true
find _site -name ".git" -exec rm -rf {} + 2>/dev/null || true
find _site -name ".github" -exec rm -rf {} + 2>/dev/null || true

- name: Upload artifact
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MeshCore GOME WarDriver

[![Version](https://img.shields.io/badge/version-1.4.1-blue.svg)](https://github.com/MrAlders0n/MeshCore-GOME-WarDriver/releases/tag/v1.4.1)
[![Version](https://img.shields.io/badge/version-1.5.0-blue.svg)](https://github.com/MrAlders0n/MeshCore-GOME-WarDriver/releases/tag/v1.5.0)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![Platform](https://img.shields.io/badge/platform-Android%20%7C%20iOS-orange.svg)](#platform-support)

Expand Down