Skip to content

Instantly share code, notes, and snippets.

View bensandee's full-sized avatar

Ben Sandee bensandee

View GitHub Profile
@bensandee
bensandee / _readme.md
Created January 17, 2021 05:25 — forked from mrjones-plip/_readme.md
PHP Endpoint for Github Webhook URLs

PHP Endpoint for Github Webhook URLs

If you love deploying websites using Github, but for some reason want to use your own server, this script might be exactly what you need.

  1. Put github.php somewhere on your PHP-enabled web server, and make it accessible for the outside world. Let's say for now the script lives on http://example.com/github.php
@bensandee
bensandee / _readme.md
Created January 17, 2021 05:25 — forked from mrjones-plip/_readme.md
PHP Endpoint for Github Webhook URLs

PHP Endpoint for Github Webhook URLs

If you love deploying websites using Github, but for some reason want to use your own server, this script might be exactly what you need.

  1. Put github.php somewhere on your PHP-enabled web server, and make it accessible for the outside world. Let's say for now the script lives on http://example.com/github.php
import android.arch.lifecycle.ViewModel
import android.os.Looper
import android.support.annotation.CallSuper
import com.google.errorprone.annotations.CheckReturnValue
import com.uber.autodispose.CompletableSubscribeProxy
import com.uber.autodispose.FlowableSubscribeProxy
import com.uber.autodispose.LifecycleNotStartedException
import com.uber.autodispose.MaybeSubscribeProxy
import com.uber.autodispose.ObservableSubscribeProxy
task archiveApks {
description = "Copies APKs and mapping files to the archive directory"
doLast {
def appName = "${rootProject.name}"
def versionDir = android.defaultConfig.versionName + "-" + android.defaultConfig.versionCode
copy {
from fileTree(dir: 'build/outputs/apk').files
into 'build/archive'
task deployApks(type: Copy) {
description = "Copies APKs to the archive directory"
def appName = "${rootProject.name}"
def versionDir = android.defaultConfig.versionName + "-" + android.defaultConfig.versionCode
println("Copies APK and Proguard to " + versionDir)
from fileTree('build/outputs/apk').files
into 'build/archive'
rename('app-(.*)-(.*)\\.apk', "${appName}-${versionDir}-\$1-\$2.apk")