Azure / draft-classic

A tool for developers to create cloud-native applications on Kubernetes.
https://draft.sh
MIT License
3.92k stars 395 forks source link

Indicate when cached packs are out of date compared to repo #843

Open shahiddev opened 6 years ago

shahiddev commented 6 years ago

There should be a way to indicate that the packs you have cached locally are out of date compared to the source repo, with option to update the cached packs.

Perhaps Draft create should output message?

draft create --pack csharp
Note: there is a new version of the csharp pack available. (instructions to update here)
--> Ready to sail

Maybe update using? If not just auto-update on draft init?

draft pack update --all/--pack csharp

Background on why I was trying to run a dotnet core application and draft up was failing due to the dockerfile being out of date. Despite running draft init I was still getting the old dockefile even though I could see the dockerfile in the repo was newer. It wasn't clear that draft was using a cached version.

bacongobbler commented 6 years ago

this sounds like a good enhancement. We can probably call draft pack-repo update before calling draft create by default, but add a feature flag like --update-packs=false should the user want to disable this functionality. That way we can just update the packs and not require the need to notify them of a new version; let's just update the packs for them on-the-fly :)