Hi Friends, Karl here,
I’m new to Swift. I’ve only been using it since 2014. Anyways! I’m trying to make some part of our build scripts more deterministic by installing consistent swift version and toolchains for a project. The problem I’m running into is that the scripts check if a certain swift version is installed at: /Library/Developer/Toolchains. But the versions installed in the user account are different than what is installed in globally. How do I ensure that the swift version that I install are installed globally?
Can I use swiftly for that?
Thanks a million fam!
Welcome to the Swift Forums!
I don’t completely understand what in this workflow is under your control, that is, what you can influence and what not. But Swiftly being a Swift toolchain manager could probably be of help for you.
Swiftly is pretty helpful in managing your user swift versions, but not as useful in managing your system swift versions. Recently in Swiftly 1.1.0, they gave us the option to choose where to install binaries and toolchains. So I think I’m going to go down that path for a little while to see how reliable I can make it.
I have Swiftly install into /opt/swiftly using the SWIFTLY_*_DIR variables. That works well.
I was able to coax the install into the right place either by manually choosing the directory when unpacking the package, or by using Swiftly to change it’s directories.
1 Like