[deploy] Use the first 8 chars of the hash
This commit is contained in:
@ -93,12 +93,12 @@ jobs:
|
|||||||
- name: Write commit hash to build file
|
- name: Write commit hash to build file
|
||||||
run: |
|
run: |
|
||||||
mkdir -p build_meta
|
mkdir -p build_meta
|
||||||
echo "${{ gitea.sha }}" > build_meta/commit.txt
|
echo "${{ gitea.sha }}" | cut -c1-8 > build_meta/commit.txt
|
||||||
|
|
||||||
- name: Build package with commit info
|
- name: Build package with commit info
|
||||||
run: |
|
run: |
|
||||||
# Write commit to _commit.py before build
|
# Write commit to _commit.py before build
|
||||||
echo "commit = '${{ gitea.sha }}'" > vrobbler/_commit.py
|
echo "commit = '$(echo ${{ gitea.sha }} | cut -c1-8)'" > vrobbler/_commit.py
|
||||||
poetry build
|
poetry build
|
||||||
# Restore original _commit.py
|
# Restore original _commit.py
|
||||||
git checkout vrobbler/_commit.py
|
git checkout vrobbler/_commit.py
|
||||||
@ -121,7 +121,7 @@ jobs:
|
|||||||
command_timeout: 2m
|
command_timeout: 2m
|
||||||
script: |
|
script: |
|
||||||
mkdir -p /var/lib/vrobbler
|
mkdir -p /var/lib/vrobbler
|
||||||
echo "${{ gitea.sha }}" > /var/lib/vrobbler/commit.txt
|
echo "${{ gitea.sha }}" | cut -c1-8 > /var/lib/vrobbler/commit.txt
|
||||||
pip uninstall -y vrobbler
|
pip uninstall -y vrobbler
|
||||||
pip install /var/lib/vrobbler/dist/*.whl
|
pip install /var/lib/vrobbler/dist/*.whl
|
||||||
vrobbler migrate
|
vrobbler migrate
|
||||||
|
|||||||
Reference in New Issue
Block a user