Skip to content

Commit

Permalink
build: convert windows build to powershell
Browse files Browse the repository at this point in the history
  • Loading branch information
idc101 committed Sep 21, 2023
1 parent 2633949 commit 7a01719
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@ jobs:
components: 'native-image'
# github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
- name: Build with SBT
run: sbt assembly
- name: Generate native image
run: build-windows.cmd
- name: Build
run: .\build-windows.ps1
- name: Upload binary
uses: actions/upload-artifact@v2
with:
Expand Down
10 changes: 0 additions & 10 deletions build-windows.cmd

This file was deleted.

12 changes: 12 additions & 0 deletions build-windows.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# & "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd"

# Get the version from the git command
& sbt -error -batch "run -c git-mkver.conf patch"
$VERSION = & sbt -error -batch "run -c git-mkver.conf next"

& sbt assembly
Set-Location -Path target\scala-2.12
& native-image -jar "git-mkver-assembly-$VERSION.jar" --no-fallback
Move-Item -Path "git-mkver-assembly-$VERSION.exe" -Destination git-mkver.exe
Compress-Archive -Path 'git-mkver.exe' -DestinationPath 'git-mkver-windows-amd64-%VERSION%.zip'
Get-FileHash git-mkver-windows-amd64-%VERSION%.zip | %% Hash

0 comments on commit 7a01719

Please sign in to comment.