Code Monkey home page Code Monkey logo

Comments (6)

Simetraa avatar Simetraa commented on July 30, 2024 1

This is something that would be very useful for me also. Just comparing the last modification to the local file to created_at would be very useful. I'd be happy to implement this myself if you'd like.

from eget.

zyedidia avatar zyedidia commented on July 30, 2024

I don't think there is any way to know the hash of the file to be downloaded without downloading it. Is there any way around that problem?

from eget.

thorstenkampe avatar thorstenkampe commented on July 30, 2024

I was under the impression that the JSON data for the latest version (https://api.github.com/repos/zyedidia/eget/releases/latest for instance) includes the hash but apparently it doesn't.

Maybe the created_at or updated_at values could be used ("if there's already a local file with the same name and the file's modification timestamp is younger than the one I would download, don't download the file from GitHub.")

from eget.

zyedidia avatar zyedidia commented on July 30, 2024

That's a good suggestion, I've implemented it in the form of the upgrade-only flag.

from eget.

thorstenkampe avatar thorstenkampe commented on July 30, 2024

Could you please reopen this issue? The --upgrade-only flag doesn't seem to work - the same same file is downloaded again and again:

> eget --download-only --upgrade-only zyedidia/eget
https://github.com/zyedidia/eget/releases/download/v1.1.0/eget-1.1.0-linux_amd64.tar.gz
Downloading 100% [========================================================================================================] (2.3/2.3 MB, 3.265 MB/s)
Extracted `eget-1.1.0-linux_amd64.tar.gz` to `eget-1.1.0-linux_amd64.tar.gz`

> eget --download-only --upgrade-only zyedidia/eget
https://github.com/zyedidia/eget/releases/download/v1.1.0/eget-1.1.0-linux_amd64.tar.gz
Downloading 100% [========================================================================================================] (2.3/2.3 MB, 5.922 MB/s)
Extracted `eget-1.1.0-linux_amd64.tar.gz` to `eget-1.1.0-linux_amd64.tar.gz`

└ > eget --download-only --upgrade-only zyedidia/eget
https://github.com/zyedidia/eget/releases/download/v1.1.0/eget-1.1.0-linux_amd64.tar.gz
Downloading 100% [========================================================================================================] (2.3/2.3 MB, 5.806 MB/s)

from eget.

dufferzafar avatar dufferzafar commented on July 30, 2024

@thorstenkampe --download-only is not expected to be specified in conjunction with --upgrade-only.

--download-only will only download the tarball, and not extract it, so when you run it again with --upgrade-only it will check for existence of eget (which doesn't exist because it was never extracted) and will download the tarball again.

from eget.

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.