Skip to content

Instantly share code, notes, and snippets.

View george-lim's full-sized avatar

George Lim george-lim

View GitHub Profile
@george-lim
george-lim / swiftlint.sh
Created January 20, 2020 00:58
A handy Xcode run script that applies SwiftLint only to new Swift codebase changes
#!/bin/bash
# Parameters
source="$(pwd)/$1" # Track folder source where diffs are checked
index=$2 # Track diff remote
project_root=${0%/*} # Track project root folder
swiftlint_path='Pods/SwiftLint/swiftlint' # Track SwiftLint path
# Parameter check
if [[ $# < 1 ]]; then
@george-lim
george-lim / project_changes.sh
Created February 20, 2020 05:19
Dynamically identify updated Xcode workspace projects with git diff
#!/bin/bash
# Parameters
workspace_path=$1 # Path to .xcworkspace to identify projects
# Parameter check
if [[ $# != 1 ]]; then
echo "usage: $0 <.xcworkspace path>"
exit 1
fi