-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
package-fastlane 2.0 that installs and builds Ruby 2.4.5 on users machine on brew cask install fastlane
#99
Conversation
…hine on brew cask install fastlane
cask/fastlane.rb.template
Outdated
@@ -11,3 +11,18 @@ cask 'fastlane' do | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 5 and 6 (GitHub won't let me comment on the line) might need to be changed to point to the new install location.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@taquitos I JUST updated this file to what is actually in cask as you were commenting probably 🙃
Do you have an idea for a good test matrix? Like what states should our mac be in when we test this update? Mojave with previous cask, without, catalina, ect... There's a decent amount of logic here I want to make sure we're covering our bases in a test matrix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, if you wrote any of that down, maybe just copypasta into a comment, otherwise maybe later on a formal matrix would be good. I really wanted to make sure we're covering all our bases but it sounds like you and @snatchev did 👍 |
# Check if old version and clean it up | ||
if [ ! -f $PACKAGED_FASTLANE_VERSION_FILE ]; then | ||
echoc "Found old version of brew packaged fastlane. Cleaning up..." yellow | ||
"$CURRENT_DIR/uninstall" -y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be calling the uninstall script of the version in ~/.fastlane/bin
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, that is a good question actually 🤔 That isn't how it the previous one worked. The current version of packaged fastlane didn't actually copy the uninstall script that wouldn't work but I think it makes sense to put it in there. So I think I'll make changes to copy this uninstall script there after install. But for the sake of this part of the code, I'll check if there is an uninstall script in ~/.fastlane/bin
and if so I'll run that otherwise I'll run the new one 😬
Re: testing, how about running install/uninstall on Circle/Travis/GitHub Actions? |
Ahhhh yeah yeah! I'll set it up on Circle 😊 I like it I like it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great. Still pretty amazed you got this modernized and working. 💯
Whoah, what is this? A reunion? 🕺 🚀 🎉 |
$FASTLANE_DIR/bundle/bin/bundle-env gem install fastlane --no-document --env-shebang | ||
|
||
# Copy the fastlane executable to run fastlane in the bundled environment | ||
cp "$CURRENT_DIR/fastlane_shim" "$FASTLANE_DIR/fastlane" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You deleted this file.
What I mean is there is no fastlane_shim
in the root.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhh, that was supposed to be committed! Thanks 😊
while getopts ":pub" opt; do | ||
case $opt in | ||
p ) SKIP_SETTING_PATH=1;; | ||
u ) DO_UNINSTALL=1;; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The help text and the cask file still contain the -u
option flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops! Thanks for catching that
{ | ||
PACKAGE=$1 | ||
|
||
read -p "The installer needs to install/upgrade $PACKAGE with brew. Is that okay? (y/N) " -n 1 choice |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be very helpful to skip the prompts with a the help of a command line option. Automating the installation a little bit easier.
So I played around a bit this afternoon because I need to roll out the newest version of fastlane to my buildmachines. As a disclaimer. I already used my own way of installing the fastlane.zip file as the defaults you set are not how I want to roll the installation process. version :latest
version :latest
sha256 :no_check
url 'https://fastlane.tools/fastlane.zip'
name 'fastlane'
homepage 'https://fastlane.tools/'
binary "#{staged_path}/fastlane_lib/snapshot"
binary "#{staged_path}/fastlane_lib/sigh"
binary "#{staged_path}/fastlane_lib/scan"
binary "#{staged_path}/fastlane_lib/produce"
binary "#{staged_path}/fastlane_lib/pem"
binary "#{staged_path}/fastlane_lib/match"
binary "#{staged_path}/fastlane_lib/gym"
binary "#{staged_path}/fastlane_lib/frameit"
binary "#{staged_path}/fastlane_lib/fastlane"
binary "#{staged_path}/fastlane_lib/deliver"
binary "#{staged_path}/fastlane_lib/cert"
binary "#{staged_path}/fastlane_lib/bundle"
binary "#{staged_path}/fastlane_lib/bundle_update_checker.rb"
binary "#{staged_path}/fastlane_lib/parse_env.rb"
binary "#{staged_path}/fastlane_lib/VERSION"
preflight do
system_command "sed", args: ['-i', '', "s/{{IS_INSTALLED_VIA_HOMEBREW}}/$INSTALLED_VIA_HOMEBREW/g", "#{staged_path}/fastlane_lib/bundle/bin/bundle-env"]
system_command "#{staged_path}/fastlane_lib/fastlane", args: ["update_fastlane"]
end
end Granted this is a hard hack but worked for me so far. I had to remove the promts, and bend the destination URL to a sub directory. This way fastlane stays in the homebew |
Ok I played around with it some more. I created a fork yesterday and adjusted it a little bit to be able to roll out. But I ran into OpenSSL error messages when using |
Ok removing this line from Line 20 in 5872716
|
Hey I made some adjustments to your changes for the new installer package. * Add missing `fastlane_shim` file * remove ssl certificate environment line from `bundle-env` * added option switch `-u` to skip prompts for autoupdate/install
…n-brew-install Fix 2.0 installer script
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
brew cask install fastlane
Motivation
Fixes fastlane/fastlane#15496
Problem
2.28.3
Goal
Description
ruby-build
./uninstall
and./install
)~/.fastlane/bin
directory gets removed./install
script will only install/upgraderuby-build
andopenssl
only if needed./install
script will only build Ruby if the version declared is not already builtHow To review
uninstall
andinstall
How to test
./uninstall
./install