This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ ${CONFIGURATION} == "AppStore" ]; then | |
buildNumber=$(git rev-list HEAD | wc -l | tr -d ' ') | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PROJECT_DIR}/AppName/AppName-Info.plist" | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PROJECT_DIR}/AppName WatchKit App/Info.plist" | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PROJECT_DIR}/AppName WatchKit Extension/Info.plist" | |
fi; | |
if [ ${CONFIGURATION} == "Release" ]; then | |
buildNumber=$(git rev-list HEAD | wc -l | tr -d ' ') | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PROJECT_DIR}/AppName/AppName-Info.plist" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* add product description to Order Form for WooCommerce product | |
* @param WC_Product $product | |
* @param array $attrs | |
*/ | |
add_action('orderform_woocommerce_order_item_end', function($product, $attrs) { | |
$description = $product->get_post_data()->post_content; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Let's define a basic Swift class. | |
class Fruit { | |
var type=1 | |
var name="Apple" | |
var delicious=true | |
} | |
// We can get at some info about an instance of an object using reflect(), which returns a Mirror. | |
reflect(Fruit()).count | |
reflect(Fruit())[1].0 |