Skip to content
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

Upgrade script for Windows #473

Merged
merged 3 commits into from Jun 28, 2017
Merged

Upgrade script for Windows #473

merged 3 commits into from Jun 28, 2017

Conversation

ghys
Copy link
Member

@ghys ghys commented Jun 28, 2017

This script will download a release or snapshot build, extract it
and perform an in-place upgrade.

Known limitations:
It will not take care of addons (.jar or .kar files for offline
installation) in the addons folder. It will also not be able to update
itself before performing the actual update, or check the current openHAB
version.

Signed-off-by: Yannick Schaus habpanel@schaus.net

This script will download a release or snapshot build, extract it
and perform an in-place upgrade.

Known limitations:
It will not take care of addons (.jar or .kar files for offline
installation) in the addons folder.  It will also not be able to update
itself before performing the actual update, or check the current openHAB
version.

Signed-off-by: Yannick Schaus <habpanel@schaus.net>
@ThomDietrich
Copy link
Member

ThomDietrich commented Jun 28, 2017

Hey @ghys 👋
That's a nice looking script. Great what you got together in such a short time! May I ask why you didn't use the existing script as a starting point!?
Just to be clear: Are you still working on the script now or is the PR finished?

@ghys
Copy link
Member Author

ghys commented Jun 28, 2017

Instructions for running the script (for the release notes):

  1. Run PowerShell with the Run as Administrator option
  2. Allow scripts to execute by running this command (confirm the security prompt):
PS > Set-ExecutionPolicy Bypass
  1. Navigate to your openHAB directory
  2. Download the script:
PS > Invoke-WebRequest -Uri https://raw.githubusercontent.com/openhab/openhab-distro/master/distributions/openhab/src/main/resources/bin/update.ps1 -OutFile update.ps1
  1. Run the script with this command (note the . at the beginning!):
PS > . .\update.ps1
  1. This will add a new cmdlet Update-openHAB to your system.
    You can use:
PS > man Update-openHAB -detailed

to get help on the available parameters.

  1. Run the update with no parameters to upgrade the distribution in the current directory to the current stable version.
PS > Update-openHAB
  1. (Optional) Restore the execution policy to the default setting with:
PS > Set-ExecutionPolicy Default

@ghys
Copy link
Member Author

ghys commented Jun 28, 2017

@ThomDietrich I have nothing to add to this script for now! I think we'll live with the current limitations. :)

@kaikreuzer
Copy link
Member

could you please rename OpenHAB to openHAB?

Signed-off-by: Yannick Schaus <habpanel@schaus.net>
@ghys
Copy link
Member Author

ghys commented Jun 28, 2017

@kaikreuzer I made this "mistake" on purpose because I think it's the de facto standard casing for PowerShell cmdlets (https://technet.microsoft.com/en-us/library/ff714569.aspx) 😋

But if you insist! 😉

(btw, they are not case sensitive, so even update-openhab would work too: https://technet.microsoft.com/en-us/library/bb648607(v=vs.85).aspx)

Signed-off-by: Yannick Schaus <habpanel@schaus.net>
@ThomDietrich
Copy link
Member

  1. Run PowerShell with the Run as Administrator option

I fear many will not know how to do that.

@kaikreuzer
Copy link
Member

@ThomDietrich So you vote against doing it with this script or are you asking for a more detailed description?

@ThomDietrich
Copy link
Member

ThomDietrich commented Jun 28, 2017

No the script is perfectly fine, just add a more detailed description

Hmmmm how about

Execute PowerShell with elevated rights (e.g. by right-clicking the start menu PowerShell entry and selecting 'Run as Administrator')

@kaikreuzer
Copy link
Member

Great what you got together in such a short time!

Indeed, pretty impressive, thanks!

I made this "mistake" on purpose because I think it's the de facto standard casing for PowerShell cmdlets

I was obviously not aware of this :-) Thanks for changing it anyhow 😎

@kaikreuzer
Copy link
Member

Ok then, let's merge the script and I will update the release notes.

@kaikreuzer kaikreuzer merged commit c6e3ae5 into openhab:master Jun 28, 2017
@kaikreuzer
Copy link
Member

Done: https://github.com/openhab/openhab-distro/releases/tag/2.1.0#manual-installations

@ghys
Copy link
Member Author

ghys commented Jun 28, 2017

Nice! Glad to have been of help and also credit where credit is due - the UNIX Shell script and the former PowerShell script.

@ghys ghys mentioned this pull request Jun 28, 2017
@kaikreuzer kaikreuzer added this to the 2.2.0 milestone Dec 15, 2017
@kaikreuzer kaikreuzer added the enhancement An enhancement or new feature label Dec 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants