summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorПавел Жуков <33721692+LeaveMyYard@users.noreply.github.com>2023-05-28 13:38:15 +0300
committerПавел Жуков <33721692+LeaveMyYard@users.noreply.github.com>2023-05-28 13:38:15 +0300
commit6562b63d1c8f12cf35d61d4d05acd4d3f8093ce4 (patch)
tree7905d9ed4515caa63cd652341921567ada5e75ae
parent1657b696931ed34ef65b7ec14c10be000615f3ee (diff)
Fix set version for Windows
-rw-r--r--.github/workflows/build-on-release.yml14
1 files changed, 13 insertions, 1 deletions
diff --git a/.github/workflows/build-on-release.yml b/.github/workflows/build-on-release.yml
index f4abc61..9c619e3 100644
--- a/.github/workflows/build-on-release.yml
+++ b/.github/workflows/build-on-release.yml
@@ -61,10 +61,22 @@ jobs:
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
- - name: Set version in code
+ - name: Set version in code (Unix)
+ if: matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest'
run: |
awk 'NR==3{$0="__version__\"'${{ github.ref_name }}'\""}1' ./robusta_krr/__init__.py > temp && mv temp ./robusta_krr/__init__.py
+ - name: Set version in code (Windows)
+ if: matrix.os == 'windows-latest'
+ run: |
+ $content = Get-Content -Path .\robusta_krr\__init__.py
+ $content[2] = "__version__=`"$($env:GITHUB_REF_NAME)`""
+ $content | Out-File -FilePath .\robusta_krr\__init__.py -Encoding ascii
+ shell: pwsh
+ env:
+ GITHUB_REF_NAME: ${{ github.ref_name }}
+
+
- name: Build with PyInstaller
shell: bash
run: |