Giter Club home page Giter Club logo

Comments (8)

KrauseFx avatar KrauseFx commented on April 23, 2024

Sorry, I don't quite understand this. You want to create your own action? Or you want to run your existing shell script?

from fastlane.

sarunw avatar sarunw commented on April 23, 2024

I want to move my existing script to actions, but in my script contains XCode variable can ruby code in actions access them?

from fastlane.

KrauseFx avatar KrauseFx commented on April 23, 2024

Are you talking about an xcodebuild command? Can you share your existing script?

from fastlane.

kdawgwilk avatar kdawgwilk commented on April 23, 2024

I am trying to do the same thing

I try running:
sh "./ipa.sh"
which contains:

/usr/bin/xcrun -sdk iphoneos PackageApplication -v "${RELEASE_BUILDDIR}/${APPLICATION_NAME}.app" -o "${BUILD_HISTORY_DIR}/${APPLICATION_NAME}.ipa" --sign "${DEVELOPER_NAME}" --embed "${PROVISONING_PROFILE}"

in my fastlane actions for my lane.
I tried including the above script directly into a fastlane sh action but it complains about the ${
I couldn't get it to work so I tried to move it to an external script but it fails with permission denied

[SHELL COMMAND]: ./ipa.sh
INFO [2015-02-06 11:43:31.74]: Variable Dump:
INFO [2015-02-06 11:43:31.74]: {:LANE_NAME=>:beta, :START_TIME=>2015-02-06 11:42:01 -0700, :BUILD_NUMBER=>0, :SIGH_PROFILE_PATH=>"/path/to/app.mobileprovision"}
FATAL [2015-02-06 11:43:31.74]: Permission denied - fork failed
FATAL [2015-02-06 11:43:31.75]: fastlane finished with errors

is there a way to embed those variables into a fastlane sh action?

from fastlane.

kdawgwilk avatar kdawgwilk commented on April 23, 2024

Heres the trace where the error occurred

/Users/user/.rvm/gems/ruby-2.2.0@global/gems/fastlane-0.1.7/lib/fastlane/actions/actions_helper.rb:60:in `spawn': Permission denied - fork failed (Errno::EACCES)
    from /Users/user/.rvm/gems/ruby-2.2.0@global/gems/fastlane-0.1.7/lib/fastlane/actions/actions_helper.rb:60:in `sh_no_action'
    from /Users/user/.rvm/gems/ruby-2.2.0@global/gems/fastlane-0.1.7/lib/fastlane/fast_file.rb:60:in `block in sh'
    from /Users/user/.rvm/gems/ruby-2.2.0@global/gems/fastlane-0.1.7/lib/fastlane/actions/actions_helper.rb:29:in `execute_action'
    from /Users/user/.rvm/gems/ruby-2.2.0@global/gems/fastlane-0.1.7/lib/fastlane/fast_file.rb:59:in `sh'
    from (eval):24:in `block (2 levels) in parse'
    from /Users/user/.rvm/gems/ruby-2.2.0@global/gems/fastlane-0.1.7/lib/fastlane/runner.rb:13:in `call'
    from /Users/user/.rvm/gems/ruby-2.2.0@global/gems/fastlane-0.1.7/lib/fastlane/runner.rb:13:in `block in execute'
    from /Users/user/.rvm/gems/ruby-2.2.0@global/gems/fastlane-0.1.7/lib/fastlane/runner.rb:12:in `chdir'
    from /Users/user/.rvm/gems/ruby-2.2.0@global/gems/fastlane-0.1.7/lib/fastlane/runner.rb:12:in `execute'
    from /Users/user/.rvm/gems/ruby-2.2.0@global/gems/fastlane-0.1.7/lib/fastlane/lane_manager.rb:15:in `block in cruise_lanes'
    from /Users/user/.rvm/gems/ruby-2.2.0@global/gems/fastlane-0.1.7/lib/fastlane/lane_manager.rb:14:in `each'
    from /Users/user/.rvm/gems/ruby-2.2.0@global/gems/fastlane-0.1.7/lib/fastlane/lane_manager.rb:14:in `cruise_lanes'
    from /Users/user/.rvm/gems/ruby-2.2.0@global/gems/fastlane-0.1.7/bin/fastlane:31:in `block (2 levels) in run'
    from /Users/user/.rvm/gems/ruby-2.2.0@global/gems/commander-4.2.1/lib/commander/command.rb:180:in `call'
    from /Users/user/.rvm/gems/ruby-2.2.0@global/gems/commander-4.2.1/lib/commander/command.rb:180:in `call'
    from /Users/user/.rvm/gems/ruby-2.2.0@global/gems/commander-4.2.1/lib/commander/command.rb:155:in `run'
    from /Users/user/.rvm/gems/ruby-2.2.0@global/gems/commander-4.2.1/lib/commander/runner.rb:421:in `run_active_command'
    from /Users/user/.rvm/gems/ruby-2.2.0@global/gems/commander-4.2.1/lib/commander/runner.rb:81:in `run!'
    from /Users/user/.rvm/gems/ruby-2.2.0@global/gems/commander-4.2.1/lib/commander/delegates.rb:8:in `run!'
    from /Users/user/.rvm/gems/ruby-2.2.0@global/gems/fastlane-0.1.7/bin/fastlane:59:in `run'
    from /Users/user/.rvm/gems/ruby-2.2.0@global/gems/fastlane-0.1.7/bin/fastlane:63:in `<top (required)>'
    from /Users/user/.rvm/rubies/ruby-2.2.0/bin/fastlane:23:in `load'
    from /Users/user/.rvm/rubies/ruby-2.2.0/bin/fastlane:23:in `<main>'
    from /Users/user/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `eval'
    from /Users/user/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `<main>'

from fastlane.

KrauseFx avatar KrauseFx commented on April 23, 2024

Mh, not sure why it complains about the $. Maybe you can just run puts system("your command") instead of the sh?

from fastlane.

almassapargali avatar almassapargali commented on April 23, 2024

Ok, there is a way of getting those variables from command like using following command:

xcodebuild -workspace Appease.xcworkspace -scheme Previews -showBuildSettings

and you'll get this:
screen shot 2015-03-07 at 12 12 59 am

Though, I'm not convinced that fastlane should handle this. If all you need is $INFOPLIST_FILE, I'd suggest declare it inside that script (yep it's hardcode, but do we move infoplist around often?).

Hey, @kdawgwilk, maybe use fastlane actions to get an ipa?

from fastlane.

KrauseFx avatar KrauseFx commented on April 23, 2024

What's the current status here? I'll close the issue for now, feel free to re-open if you're still experiencing problems.

from fastlane.

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.