Skip to content

Instantly share code, notes, and snippets.

@timgshi
timgshi / app.js
Last active August 29, 2015 14:11
Files to host a template app download page for DryDock.
// These two lines are required to initialize Express in Cloud Code.
var express = require('express');
var app = express();
var versionTracker = require('cloud/versionTracker.js');
var VDDModelApp = Parse.Object.extend("VDDModelApp");
// Global app configuration section
app.set('views', 'cloud/views'); // Specify the folder to find templates
app.set('view engine', 'ejs'); // Set the template engine
@timgshi
timgshi / drydock_main.js
Created December 16, 2014 02:08
DryDock custom cloud code to update apps.
var VDDModelApp = Parse.Object.extend("VDDModelApp");
Parse.Cloud.define("buildServerUpdate", function(request, response) {
console.log(JSON.stringify(request.params));
var bundleIdentifier = request.params['bundle_identifier'];
var versionChannel = request.params['version_channel'];
var installUrl = request.params['install_url'];
var versionNumber = request.params['version_number'];
var buildNumber = request.params['build_number'];
var foundModelApp;
@timgshi
timgshi / submitToDryDock.sh
Created December 16, 2014 02:05
Submit to DryDock bash script for bitrise.
#!/bin/bash
#
unzip "$BITRISE_IPA_PATH" > /dev/null
BASE_NAME=${BITRISE_IPA_PATH##*/}
APP_NAME=${BASE_NAME%.*}
BUNDLEID=`/usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" ./Payload/"$APP_NAME".app/Info.plist`
BUNDLEVER=`/usr/libexec/PlistBuddy -c "Print :CFBundleVersion" ./Payload/"$APP_NAME".app/Info.plist`
@timgshi
timgshi / app.js
Created December 6, 2014 00:00
VENVersionTracker with DryDock on Parse
// These two lines are required to initialize Express in Cloud Code.
var express = require('express');
var app = express();
var versionTracker = require('cloud/versionTracker.js');
// Global app configuration section
app.set('views', 'cloud/views'); // Specify the folder to find templates
app.set('view engine', 'ejs'); // Set the template engine
app.use(express.bodyParser()); // Middleware for reading request body
@timgshi
timgshi / main.js
Created November 22, 2012 00:42
This uses Parse Cloud Code to attempt to save instagram relationships from an instagram json object.
// Use Parse.Cloud.define to define as many cloud functions as you want.
// For example:
Parse.Cloud.define("hello", function(request, response) {
response.success("Hello world!");
});
Parse.Cloud.define("receiveinstagram", function(request, response) {
var photo = request.params.data;
var query = new Parse.Query("instagram_moment");
@timgshi
timgshi / aerobuild.sh
Created April 17, 2012 21:29 — forked from idoru/aerobuild.sh
bump version, build & archive, tag git version and publish iOS app builds to testflight
#!/bin/sh
#
# aerobuild.sh
#
# What does this do?
# ==================
# - Bumps build numbers in your project using agvtool
# - Builds your app and packages it for testing/ad-hoc distribution
# - Commits build number changes to git