Skip to content

Instantly share code, notes, and snippets.

Avatar

Andrew Theis andrewtheis

View GitHub Profile
View _form.html.erb
<%= form_for @account do |f| %>
<%= render "shared/form_errors", :object => @account %>
# ... Other form view code here ...</span>
@andrewtheis
andrewtheis / set_build_number.sh
Created October 23, 2013 22:02
A way to execute bash scripts only for certain configuration and if that script exists
View set_build_number.sh
if [[ ${CONFIGURATION} == "Ad Hoc" && -f /var/xcode_ci_scripts/bump_and_tag.sh ]]; then
/var/xcode_ci_scripts/bump_and_tag.sh
else
echo "Skipping version bump"
fi
@andrewtheis
andrewtheis / bump_and_tag.sh
Last active December 26, 2015 09:09
Grabs the latest tag and sets the version number. You must only have version numbers as tags and they must be in format "X.y[.z]-B" where: X, y are major and minor versions; z (patch version) is optional; and B is the build number. Execute this with a post-build script phase similar to this: https://gist.github.com/andrewtheis/7127566
View bump_and_tag.sh
#!/bin/sh
PLIST_PATH="${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}"
# Get the current version and extract the version/build from there
LATEST_TAG=`xcrun git describe --tags --abbrev=0`
TAG_BUILD_NUM=${LATEST_TAG#*-}
TAG_VERSION=${LATEST_TAG%-*}
NEW_BUILD_NUM=$(expr $TAG_BUILD_NUM + 1)
View scenecheck-initial.dump
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.6.5
-- Dumped by pg_dump version 9.6.5
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;