Git Product home page Git Product logo

backdrop's Introduction

#About

Backdrop is a utility for configuring an application's Info.plist file for separate environments. It can be used:

  • In dev environments for quickly switching between dev, staging, production environments.
  • On continuous integration build servers to automate deployment of pre-configured builds.

#How Does it Work?

  • We create an EnvFile.plist that declares the properties (icon file, TyphoonConfig, CFBundleID, etc) that will be different between each environment.
  • We use a cmd-line utility to apply those configurations.

Optionally, the cmd-line utility can apply a build number - CFBundleVersion - in the format: <week_number_since_project_start>.<day_in_week>.<build_number_for_day>

Running

Apply the config named 'staging' in the EnvFile.plist, and generate a new version number.

backdrop.swift --select staging --newVersion

Using in CI Environments

Here's how we do it:

  • Set up a branch for each environment in git, and set up a Jenkins job to monitor for pushes to those branches.
  • Exececute the follow script to build and upload to iTunes Connect

(the script below uses Shenzhen to upload the build)

#!/bin/sh


product_name='AmazingApp'
provisioning_profile='My Store Profile'

#Fail immediately if a task fails
set -e
set -o pipefail

echo "--- Backing up Info.plist ---"
cp "./$product_name/Supporting Files/Info.plist" "./$product_name/Supporting Files/Info.plist.bak"

echo "--- Building ---"

rm -fr ./$product_name.ipa
rm -fr ./$product_name.xcarchive/

./backdrop.swift --select production --newVersion

xcodebuild -workspace $product_name.xcworkspace/ -scheme $product_name -destination 'generic/platform=iOS' -archivePath "$product_name.xcarchive" archive | xcpretty
xcodebuild -exportArchive -exportFormat ipa -archivePath "$product_name.xcarchive"  -exportPath "$product_name.ipa" -exportProvisioningProfile "$provisioning_profile"
ipa info $product_name.ipa

echo "------ Built ------"
rm "./$product_name/Supporting Files/Info.plist"
mv "./$product_name/Supporting Files/Info.plist.bak" "./$product_name/Supporting Files/Info.plist"
./backdrop.swift

Installing

Later we'll publish to Brew and MacPorts, but for now, this executable Swift script can be used.

TODO

  1. Make backdrop peform the build and upload to iTunes Connect, rather than use the bash script above.
  2. Remove the dependency on Shenzhen ipa distribute task.
  3. Add generation of debug symbols and tie in to our (or others?) crash reporters

backdrop's People

Contributors

jasperblues avatar

Watchers

Jay Q avatar

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.