Sha256: 311d0156955290dc3cbca5914eb7b3110e77f9a5c5df4e15a9d59aed29e632d8
Contents?: true
Size: 1.4 KB
Versions: 6
Compression:
Stored size: 1.4 KB
Contents
#!/usr/bin/env ruby # coding: utf-8 module Cuesmash # # Provides an object to get information about the ios app that is being built. # # @author [jarod] # class IosApp # Public: the path to the dir containing the built app i.e. /tmp/MyAppQWERQW/Build/Products/Debug-iphonesimulator/ attr_reader :app_dir # Public: the full path including the built app i.e. /tmp/MyAppQWERQW/Build/Products/Debug-iphonesimulator/MyApp.app" attr_reader :app_path # Public: the app name i.e. MyApp.app attr_reader :app_name # Public: the xcode Derived Data temp directory attr_reader :tmp_dir # # Create a new App instance # # @param file_name [String] The usually is the scheme of the xcode project # @param travis_build [Boolean] if the build is running on travis-ci # # @return [App] A app instance def initialize(file_name:, travis_build: false) @app_name = "#{file_name}" << ".app" @tmp_dir = Dir.mktmpdir(file_name) # if we are running this on travis then we want to build inside the project # dir (it's a VM so it gets cleaned up each run). Otherwise let's create # our own tmp dir for each build. if travis_build @app_dir = "./build/Release-iphonesimulator/" else @app_dir = "#{@tmp_dir}" << "/Release-iphonesimulator/" end @app_path = "#{@app_dir}" << "#{@app_name}" end end end
Version data entries
6 entries across 6 versions & 1 rubygems