Skip to content

Instantly share code, notes, and snippets.

View AlexChesters's full-sized avatar

Alex Chesters AlexChesters

View GitHub Profile
@AlexChesters
AlexChesters / declarative.groovy
Last active July 13, 2017 21:24
An example of a declarative Jenkins Pipeline
pipeline {
stages {
stage('Preparation') {
env.mvnHome = tool 'M3'
}
stage('Build') {
sh "'${mvnHome}/bin/mvn' -Dmaven.test.failure.ignore clean package"
}
}
post {
@AlexChesters
AlexChesters / scripted.groovy
Last active July 13, 2017 21:24
An example of a Scripted Jenkins Pipeline
node {
try {
def mvnHome
stage('Preparation') {
git 'https://github.com/jglick/simple-maven-project-with-tests.git'
mvnHome = tool 'M3'
}
stage('Build') {
sh "'${mvnHome}/bin/mvn' -Dmaven.test.failure.ignore clean package"
}
@AlexChesters
AlexChesters / URLBuilder.h
Last active December 8, 2015 14:32
URLBuilder class written in Objective-C
//
// URLBuilder.h
// lyrical
//
// Created by Alex Chesters on 13/11/2015.
// Copyright © 2015 Alex Chesters. All rights reserved.
//
#import <Foundation/Foundation.h>
@AlexChesters
AlexChesters / incrementbuild.sh
Created July 4, 2015 14:28
Increment build number in Xcode automatically when archiving (add as a build step)
if [ $CONFIGURATION == Release ]; then
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${PROJECT_DIR}/${INFOPLIST_FILE}")
buildNumber=$(($buildNumber + 1))
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PROJECT_DIR}/${INFOPLIST_FILE}"
fi