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

Implement auto update #5

Open
mrtank opened this issue Sep 22, 2021 · 2 comments
Open

Implement auto update #5

mrtank opened this issue Sep 22, 2021 · 2 comments
Labels

Comments

@mrtank
Copy link
Member

mrtank commented Sep 22, 2021

Later we can add more functionality, like ws update (updates all WebSharper.* packages and tooling for people not using Paket), ws watch (auto-build on file changes), etc.

Also, on booster: if multiple services are running and current one is not the latest version, we could print a message about it (just for detailed log, not an MSBuild warning)

From #1

That would mean dotnet ws tool can check the latest version from nuget feeds.

Whenever a dotnet ws usage happens in a directory with a WebSharper project in it, a warning should be displayed with the new version number available. Like

An update for template pack WebSharper.Core is available.
    install command: dotnet ws update

Deciding if the current folder have a WebSharper project is the following:
If

paket outdated

succeeds, and outputs a line * WebSharper x -> y, than paket update WebSharper.* is issued. Where * is all the packages installed prefixed with WebSharper

If fails,

dotnet list package --outdated

is checked for WebSharper x y z. If it exists dotnet add package WebSharper.* is issued. Where * is all the packages installed prefixed with WebSharper

There would be a --pre flag for dotnet ws update which would add --pre to paket outdated , add --version y to paket update where y would be read from paket outdated, add --include-prerelease to dotnet list package, add --prerelease to dotnet add package.

@Jand42
Copy link
Member

Jand42 commented Sep 22, 2021

We can also call paket update WebSharper* --filter for an easier single command update, see https://fsprojects.github.io/Paket/paket-update.html

@mrtank
Copy link
Member Author

mrtank commented Sep 22, 2021

Yes. That's an option for non-pre. fsprojects/Paket#278 I believe you must specify version if --pre is given. If --pre is given version info for each package have to be read from paket outdated --pre, and issue update with those.

The gist of the problem is with --pre on, that it's possible to have prerelease from different sources.

nuget Example >= 1.2.3 alpha  // At least 1.2.3 including alpha versions.
nuget Example >= 2 beta rc    // At least 2.0 including rc and beta versions.
nuget Example >= 3 rc         // At least 3.0 including rc versions.
nuget Example >= 3 prerelease // At least 3.0 including all prerelease versions

Paket decided to rely on the version in the dependencies file, or update to specific version http://fsprojects.github.io/Paket/nuget-dependencies.html#PreReleases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants