leoafarias / fvm

Flutter Version Management: A simple CLI to manage Flutter SDK versions.
https://fvm.app
MIT License
4.59k stars 226 forks source link

Support a custom FLUTTER_STORAGE_BASE_URL as the source for Flutter package downloads #688

Open oravecz opened 6 months ago

oravecz commented 6 months ago

We cannot install Flutter from a Git cache, nor can we download Flutter from the https://storage.googleapis.com/flutter_infra_release/releases location. Instead, we maintain our own versions of Flutter SDKs on an internal location which we set our FLUTTER_STORAGE_BASE_URL to. We also maintain our own version of the Flutter metadata files with our own checksum values in the same manner as Google.

Looking at the source code, I thought that FVM would respect the FLUTTER_STORAGE_BASE_URL environment variable, but it does not.

Is it feasible to make a modification to the source code to ensure that FLUTTER_STORAGE_BASE_URL is used as the source for Flutter packages to be put in the local cache?

Originally posted by @oravecz in https://github.com/leoafarias/fvm/discussions/571

digoreis commented 3 months ago

@oravecz this issue was resolved in this PR #593 , correct ?

charles0122 commented 2 weeks ago

@digoreis I think this is another solution, the method of setting FLUTTER_STORAGE_BASE_URL and FLUTTER_GIT_URL two variables is different, the former is generally strong, but requires fvm to adjust more code, the latter is more relevant, the modification is only download flutter specific sdk's repository

oravecz commented 2 weeks ago

Setting FLUTTER_GIT_URL was the approach we needed to be able to point fvm at our custom Flutter git repository.

If I recall correctly, this ticket was made earlier before I understood the difference between the two environment variables.

charles0122 commented 2 weeks ago

If that's the case, and you found that the solution to this problem was to set FLUTTER_GIT_URL, then you can change the environment variable in the title and close this issue. If you still have other problems, you can open another one.