mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-03 20:13:02 +00:00
ci/cd
This commit is contained in:
@@ -75,6 +75,11 @@ jobs:
|
||||
cd swingmusic-desktop
|
||||
npm install
|
||||
|
||||
- name: Install webclient dependencies
|
||||
run: |
|
||||
cd swingmusic-webclient
|
||||
npm install
|
||||
|
||||
- name: Build the app
|
||||
run: |
|
||||
cd swingmusic-desktop
|
||||
@@ -116,6 +121,11 @@ jobs:
|
||||
cd swingmusic-desktop
|
||||
npm install
|
||||
|
||||
- name: Install webclient dependencies
|
||||
run: |
|
||||
cd swingmusic-webclient
|
||||
npm install
|
||||
|
||||
- name: Build the app
|
||||
run: |
|
||||
cd swingmusic-desktop
|
||||
@@ -157,6 +167,11 @@ jobs:
|
||||
cd swingmusic-desktop
|
||||
npm install
|
||||
|
||||
- name: Install webclient dependencies
|
||||
run: |
|
||||
cd swingmusic-webclient
|
||||
npm install
|
||||
|
||||
- name: Build the app
|
||||
run: |
|
||||
cd swingmusic-desktop
|
||||
|
||||
@@ -211,6 +211,11 @@ jobs:
|
||||
cd swingmusic-desktop
|
||||
npm install
|
||||
|
||||
- name: Install webclient dependencies
|
||||
run: |
|
||||
cd swingmusic-webclient
|
||||
npm install
|
||||
|
||||
- name: Build the app
|
||||
run: |
|
||||
cd swingmusic-desktop
|
||||
@@ -303,7 +308,7 @@ jobs:
|
||||
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
||||
VERSION=${GITHUB_REF#refs/tags/v}
|
||||
else
|
||||
VERSION=$(python -c "import sys; sys.path.insert(0, 'src'); from swingmusic import __version__; print(__version__)")
|
||||
VERSION=$(python3 -c "import sys; sys.path.insert(0, 'src'); from swingmusic import __version__; print(__version__)")
|
||||
VERSION="$VERSION-${{ github.run_number }}"
|
||||
fi
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
import os
|
||||
from importlib import metadata as importlib_metadata
|
||||
|
||||
try:
|
||||
__version__ = importlib_metadata.version("swingmusic")
|
||||
except importlib_metadata.PackageNotFoundError:
|
||||
# fallback to version.txt
|
||||
version_file = os.path.join(os.path.dirname(__file__), "..", "..", "version.txt")
|
||||
with open(version_file, "r") as f:
|
||||
__version__ = f.read().strip()
|
||||
Reference in New Issue
Block a user