Skip to content

Commit 34a5823

Browse files
authored
update powershell script
1 parent 64f8ca7 commit 34a5823

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

.github/workflows/dargon2_library-builder.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,14 @@ jobs:
102102
run: Copy-Item “argon2_library\vs2015\build\Argon2OptDll.dll” -Destination “lib\src\blobs\libargon2-win.dll”
103103
- name: Check if there are changes
104104
run: |
105-
function check() {
106-
if [[ -z "$(git status --porcelain)" ]];
107-
then
108-
echo "0"
109-
else
110-
echo "1"
111-
fi
112-
}
113-
echo "CHANGED=$(check)" >> $GITHUB_ENV
105+
$status = git status --porcelain
106+
$num = 0
107+
if ($status -eq "") {
108+
Set-Variable -Name "num" -Value "0"
109+
} else {
110+
Set-Variable -Name "num" -Value "1"
111+
}
112+
echo "CHANGED=$num" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
114113
- name: Push if Changed
115114
if: ${{ env.CHANGED == '1' }}
116115
run: |

0 commit comments

Comments
 (0)