Giter VIP home page Giter VIP logo

Comments (9)

frankLife avatar frankLife commented on July 26, 2024

It's good to download git in a better way. Shall we provide mirror mechanism to speed up users' downloading in some area like china ?

from dugite.

frankLife avatar frankLife commented on July 26, 2024

@shiftkey Could you give us some advice ?
The developers in china may suffer the speed of the download of dugite-native for some reason .

from dugite.

shiftkey avatar shiftkey commented on July 26, 2024

@frankLife this issue is for the contents of this file - the details in there change per release, and updating that is a manual process.

dugite/script/config.js

Lines 14 to 23 in c535d05

if (process.platform === 'darwin') {
config.checksum = 'd9f5afe8c0c18c9d595e57e1e96958a337a0ee72d547d3cbf0e698d69b524a1e'
config.source = 'https://github.com/desktop/dugite-native/releases/download/v2.14.2-rc3/dugite-native-v2.14.2-macOS-20.tar.gz'
} else if (process.platform === 'win32') {
config.checksum = 'bfe092195459ba9a1e88c8d0b6812373cdc01877ae7f9b2c05c8e463398f372c'
config.source = 'https://github.com/desktop/dugite-native/releases/download/v2.14.2-rc3/dugite-native-v2.14.2-win32-20.tar.gz'
} else if (process.platform === 'linux') {
config.checksum = 'aa8a9107b310b65cb26143e82fdbc1c48a4cc9efc63aeb64b33710ec3ceefb67'
config.source = 'https://github.com/desktop/dugite-native/releases/download/v2.14.2-rc3/dugite-native-v2.14.2-ubuntu-20.tar.gz'
}

I was looking at letting the end user control where the local packages are stored in #134 so you could cache the artefacts for CI scenarios. But that's not quite what you're looking for.

If there's a secondary server which stores this releases in a similar, I'm happy to co-ordinate supporting this. I'm not sure how I feel about #137 and using three environment variables, but I do like using environment variables to control this behaviour.

What about if, instead of an environment variable for each platform, we had a single one like DUGITE_NATIVE_DOWNLOAD_SOURCE which we could then use to change the URLs we use?

from dugite.

frankLife avatar frankLife commented on July 26, 2024

@shiftkey If we use single one like DUGITE_NATIVE_DOWNLOAD_SOURCE , dose it mean that we join the three platform download urls and using it by splitting ?
or changing the prefix like https://github.com/desktop/dugite-native/releases/download/ to concat the source suffix ?
I feel the second method may be not very good that it needs to match the download path in other server.
But I hope the #134 can be merged soon which we can use to solve the problem in another way.

from dugite.

shiftkey avatar shiftkey commented on July 26, 2024

@frankLife

If we use single one like DUGITE_NATIVE_DOWNLOAD_SOURCE, dose it mean that we join the three platform download urls and using it by splitting ?

This depends on how this alternate source will host the artefacts. If they are at a predictable URL that is similar to the GitHub releases, and the file names remain the same, then we might be able to do it.

For example, this is a GitHub release URL:

https://github.com/desktop/dugite-native/releases/download/v2.14.3-rc1/dugite-native-v2.14.3-macOS-23.tar.gz

To simplify it down, let me swap in a few placeholders:

[HOST]/desktop/dugite-native/releases/download/[VERSION]/[FILE]

The VERSION and FILE parameters should be the same - we'll be doing the same checksumming of the downloaded bits - and HOST will obviously change to be a different server, but if the rest is done in a predictable way (GitHub has it's way of finding releases, HOST might be different) then I think we can get away with one environment variable for HOST.

I'll make finishing up #134 a priority in the meantime (I need to document it, I think that's all that's left).

from dugite.

frankLife avatar frankLife commented on July 26, 2024

Yes, we can only provide HOST and I think it needs more effort to deal with the download path. Shall we provide a way which it can save the effort and get more flexibility with consideration of checksumming ?

from dugite.

shiftkey avatar shiftkey commented on July 26, 2024

@frankLife I think the next step is finding someone is willing to setup an alternate server in China which mirrors these updates, so we can start experimenting with how this will work in the script.

from dugite.

frankLife avatar frankLife commented on July 26, 2024

@fengmk2 may you give this support ?

from dugite.

shiftkey avatar shiftkey commented on July 26, 2024

I'm going to close this out as it's sat for over a year without any movement, but if someone wants to get involved with hosting please get in touch.

from dugite.

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.