forked from DODAS-TS/rclone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
win-build.bat
executable file
·5 lines (3 loc) · 1.04 KB
/
win-build.bat
1
2
3
4
5
@echo off
set "psCommand=powershell -Command ""$replacement = Get-Content -Raw -Path 'win-cmd.txt'; $content = Get-Content -Raw -Path 'rclone\Makefile'; $pattern = '(?s)(rclone:.*?\r?\ntest_all:)'; $editedText = $content -replace $pattern, $replacement; Set-Content -Value $editedText -Path 'rclone\Makefile'; $pattern = '(?s)(\# Version of last release \(may not be on this branch\).*?\r?\n\# Last tag on this branch)'; $content = Get-Content -Raw -Path 'rclone\Makefile'; $editedText = $content -replace $pattern, ''; Set-Content -Value $editedText -Path 'rclone\Makefile'; $pattern = '(?s)(\# Next version.*?\r?\n\# If we are working on a release, override branch to master)'; $content = Get-Content -Raw -Path 'rclone\Makefile'; $editedText = $content -replace $pattern, ''; Set-Content -Value $editedText -Path 'rclone\Makefile'; $pattern = '(?s)(BRANCH := master.*?\r?\nendif)'; $content = Get-Content -Raw -Path 'rclone\Makefile'; $editedText = $content -replace $pattern, 'endif'; Set-Content -Value $editedText -Path 'rclone\Makefile';""
%psCommand%