-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add _rg.ps1 to windows zip #401
Conversation
Tested with local cargo build paths.
Apologies for the extra hassle. |
No worries! This looks good. If something goes wrong at the next release I will deal with it. Thank you for doing the leg work on this. :-) |
Sadly, I had to revert this because it didn't actually work. I don't have time at the moment to figure out how to do globbing on Windows, but apparently the obvious thing doesn't work? See logs here: https://ci.appveyor.com/project/BurntSushi/ripgrep/build/1.0.341/job/7o1jqicmtwm7oa00 |
Ugh. That glob worked on my Win7 machine using Powershell. I'll take a look at the referenced URL to see if I can determine what went wrong. |
@dstcruz Thanks. :-) I will also eventually look into it, but it's such a pain to debug and I was trying to hurry off to bed last night. :-) |
Appveyor by default runs cmd scripts and cmd copy will not do directory globbing. Powershell copy will do directory globbing and you can ask appveyor to run a line as powershell by prepending before_deploy:
# Generate artifacts for release
# TODO(burntsushi): How can we enable SSSE3 on Windows?
- cargo build --release
- mkdir staging
- copy target\release\rg.exe staging
- ps: copy target\release\build\ripgrep-*\out\_rg.ps1 staging
- cd staging
- # release zipfile will look like 'rust-everywhere-v1.2.3-x86_64-pc-windows-msvc'
- 7z a ../%PROJECT_NAME%-%APPVEYOR_REPO_TAG_NAME%-%TARGET%.zip *
- appveyor PushArtifact ../%PROJECT_NAME%-%APPVEYOR_REPO_TAG_NAME%-%TARGET%.zip I have tested the above on my own appveyor build and it works as expected. If you wanted to run the whole script in powershell then you can use this syntax (note the environment variables have been changed to use powershell syntax): before_deploy:
# Generate artifacts for release
# TODO(burntsushi): How can we enable SSSE3 on Windows?
- ps: |
cargo build --release
mkdir staging
copy target\release\rg.exe staging
copy target\release\build\ripgrep-*\out\_rg.ps1 staging
cd staging
# release zipfile will look like 'rust-everywhere-v1.2.3-x86_64-pc-windows-msvc'
7z a "../$($env:PROJECT_NAME)-$($env:APPVEYOR_REPO_TAG_NAME)-$($env:TARGET).zip" *
appveyor PushArtifact "../$($env:PROJECT_NAME)-$($env:APPVEYOR_REPO_TAG_NAME)-$($env:TARGET).zip" |
It was quicker to make the PR than edit the above post 😄 See #408 |
Tested with local cargo build paths.