add install scripts
Type of change
- [ ] Bug fix
- [ ] New feature development
- [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [x] Build/deploy pipeline (DevOps)
- [x] Other
Objective
Code changes
- file.ext: Description of what was changed and why
Before you submit
- Please add unit tests where it makes sense to do so
Checkmarx One – Scan Summary & Details – b77dac5c-a984-4807-8833-fe7a82afa5f9
No New Or Fixed Issues Found
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 59.86%. Comparing base (
00b2120) to head (3ff5cde).
Additional details and impacted files
@@ Coverage Diff @@
## main #645 +/- ##
=======================================
Coverage 59.86% 59.86%
=======================================
Files 189 189
Lines 12457 12457
=======================================
Hits 7457 7457
Misses 5000 5000
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Not a bad location, but I agree we should think about where we want this. (If we do keep it in the bws crate I think it should definitely be in some type of subdirectory rather than the crate root.)
Some location ideas:
- Separate directory, like
crates/bws/scripts/<here> - GitHub Gist
- Somewhere else?
Great idea 🎉
@coltonhurst, yeah, I'm beginning to think that the first option you provided is probably the way to go to avoid cluttering things too much. I don't think a GitHub gist will do though because we'll need to be able to automatically bump the version numbers in the install scripts.
I'll wait to see if any other ideas come up before moving them there, just to give other people the chance to chime-in.
@coltonhurst, I added an uninstallation arg in https://github.com/bitwarden/sdk/pull/645/commits/24e0e98281f30200fec93980ce4b40d803487975.
It's pretty easy to invoke in Linux/macOS with:
curl https://raw.githubusercontent.com/bitwarden/sdk/2dba059c1ee17366debb9535cff34fda767c3ff9/crates/bws/scripts/install.sh | sh -s -- --uninstall
However, I can't figure out a straightforward way to pass the -Uninstall arg through Invoke-Expression in PowerShell, so the best way to perform an uninstallation on Windows will require downloading the install script locally and passing the arg directly, like this:
.\install.ps1 -Uninstall
If you have greater PowerShell finesse than me, you can probably pass the -Uninstall arg through the
iex https://raw.githubusercontent.com/bitwarden/sdk/2dba059c1ee17366debb9535cff34fda767c3ff9/crates/bws/scripts/install.ps1 | iex # not sure how to pass args to the script through this???
one-liner, but I haven't been successful in doing so.
@coltonhurst, Added mention of the install scripts in the README in https://github.com/bitwarden/sdk/pull/645/commits/035ca9340bfaa706370e083e95dd79f9cc364b39
Approved, but would like to know other's feedback @coltonhurst on whether uninstalling should also remove
.bwsconfig directory - i am personally fine with it.
Yeah I think we should make sure everything is cleared so there is no trace on the users system.