Giter Club home page Giter Club logo

Comments (8)

stealthybox avatar stealthybox commented on May 13, 2024 11

Here is a workaround in shell:

for tool in $(asdf plugin list); do
  asdf install "${tool}" latest  \
    &&  asdf global "${tool}" latest  \
    &&  echo "${tool} set globally"
done

You can add a shell alias for this or put it a script on your path

from asdf.

HashNuke avatar HashNuke commented on May 13, 2024 1

@jrasanen asdf plugin-update --allmight be what you are looking for.
Closing this issue. Please do re-open it if you think it wasn't the appropriate answer you were looking for.

from asdf.

aaccioly avatar aaccioly commented on May 13, 2024 1

HI @HashNuke, I'm sorry if this has already been implemented, but I guess that the feature that @jrasanen was talking about, and the one that I'm looking for is not about updating plugins, it's about updating every software to it's latest and greatest version.

E.g.:

❯ asdf list
bat
  0.21.0
fzf
  0.29.0
golang
  1.18.2
gradle
  7.4.2
hugo
  0.99.0

New proposed magical command:

❯ asdf update --all
Updating fzf to latest version: 0.30.0...
Updating gradle to latest version: 7.5-milestone-1...
Updating hugo to latest version: 0.99.1...
   
All packages updated
...

❯ asdf list
bat
  0.21.0
fzf
  0.30.0
golang
  1.18.2
gradle
  7.5-milestone-1
hugo
  0.99.1

I could certainly use an update --all command, or at least a combination of install latest --all + asdf global latest --all.

I mean, I wrote my own combination of scripts to do this, but it would be nice if this functionality could be part of the main CLI, so that people that are only interested in the latest and greatest version of the software can use it as a more traditional package manager.

from asdf.

HashNuke avatar HashNuke commented on May 13, 2024

Hello @jrasanen,
Yes. Suggestions are always welcome :)
Can you share an example use-case for the hooks?

from asdf.

jrasanen avatar jrasanen commented on May 13, 2024

@HashNuke Hi, sorry for the late response. Use case being ability to bump multiple packages to the latest stable.

So maybe this could be two new hooks, 1) a hook for a package retrieving if newer version is available and 2) update.

from asdf.

v3rm0n avatar v3rm0n commented on May 13, 2024

Looking for this as well, but not sure if it is possible since how do you define latest and greatest? For example if you list java versions you get zulu-jre-javafx-18.30.11 as the latest version but this is actually the latest of zulu-jre-javafx version of java. If I'm currently using adoptopenjdk-jre then it would replace it with a version I don't actually want.
I would llike to get adoptopenjdk-jre-18.0.1+10 which is quite high up in the list because it starts with a 🤔

from asdf.

aaccioly avatar aaccioly commented on May 13, 2024

@v3rm0n , for an update all it's certainly trickier, but for java itself, I think that you can use a prefix (e.g., adoptopenjdk-jre + latest).

This would be a way to do it for Java, Python, etc. Find the current prefix + install the latest version with this prefix.

from asdf.

CanRau avatar CanRau commented on May 13, 2024

was also looking for something like asdf global all latest or something, for now I just stuffed the loop from @stealthybox in my upgradeall function 🤓

from asdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.