Skip to content

Instantly share code, notes, and snippets.

View viktorbenei's full-sized avatar

Viktor Benei viktorbenei

  • Bitrise Ltd (CTO & Cofounder)
  • Hungary
View GitHub Profile
@viktorbenei
viktorbenei / bitrise_cocoapods_upgrade.sh
Created October 15, 2014 10:22
Upgrade CocoaPods on Bitrise
#!/bin/bash
#
# Prints the given command, then executes it
# Example: print_and_do_command echo 'hi'
#
function print_and_do_command {
echo " -> $ $@"
$@
}
@viktorbenei
viktorbenei / bitrise_xcode_versions.sh
Created November 1, 2014 15:20
Bitrise: list Xcode versions
#!/bin/bash
FILES=/Applications/Xcodes/Xcode*.app
for f in $FILES
do
echo "--------------"
echo "Switching to Xcode at: ${f}"
xcode_switch_arg="${f}/Contents/Developer"
sudo xcode-select --switch "${xcode_switch_arg}"
echo " Version info:"
xcodebuild -version
@viktorbenei
viktorbenei / kill_ssh_agent.sh
Created November 7, 2014 13:23
kill ssh agent and load a new one
#!/bin/bash
echo "----------------"
echo "Removing existing keys"
ssh-add -K
echo "----------------"
echo "List of keys:"
ssh-add -l
echo "----------------"
ssh-agent -k
@viktorbenei
viktorbenei / bitrise_list_source_code_dir.sh
Created November 12, 2014 18:53
Bitrise: List the source code dir's content
#!/bin/bash
echo "---- Source Dir content:"
ls -alh "${BITRISE_SOURCE_DIR}"
echo "-------------------------"
@viktorbenei
viktorbenei / bitrise_get_box_info.sh
Created November 15, 2014 23:31
Bitrise: get bitrise VM box info
#!/bin/bash
echo "--- Bitrise Box Info:"
cat ~/Desktop/box-info.json
echo "---------------------"
@viktorbenei
viktorbenei / bitrise_save_environment_into_bash_profile.sh
Created November 17, 2014 06:57
Bitrise: save environment to .bash_profile
#!/bin/bash
#
# To export an environment for other steps in your workflow you have to add the environment variable to
# a persistent environment store. Every step runs in it's own shell session and so if
# a previous step just exports an environment it won't be available for other steps,
# unless you add it to a persistent store (like .bash_profile)
#
#
@viktorbenei
viktorbenei / gist:d87d290d910f67a3b04b
Created November 18, 2014 16:01
Bitrise: install mogenerator with brew
#!/bin/bash
#
# Add this script as a Bash Script Runner step or use this gist directly on Bitrise
# to install mogenerator (https://github.com/rentzsch/mogenerator)
# with the pre-installed homebrew (http://brew.sh/)
#
brew update
brew install mogenerator
@viktorbenei
viktorbenei / bitrise_fabric_crashlytics.sh
Created December 10, 2014 12:03
Bitrise: Twitter Fabric Crashlytics iOS app distribution
#!/bin/bash
#
# Notes:
# * You can get your source code's path on Bitrise with the ${BITRISE_SOURCE_DIR} environment variable
# * The IPA path (if you use the Xcode Archive Step) is stored in the ${BITRISE_IPA_PATH} environment
#
/path/to/Crashlytics.framework/submit <API_KEY> <BUILD_SECRET> -ipaPath "${BITRISE_IPA_PATH}" -emails TestEmail@crashlytics.com,AmazingTester@twitter.com -notesPath ~/Notes/ReleaseNotes.txt -groupAliases GroupAlias,GroupAlias2
@viktorbenei
viktorbenei / start_android_studio.sh
Last active October 28, 2017 21:04
Start Android Studio on OS X with latest JVM
#!/bin/bash
#
# Env export required for JDK newer than 1.6 or 1.7
# see: http://stackoverflow.com/questions/20925253/android-studio-failed-to-load-jvm-on-mac-osx-mavericks/27647165#27647165
# OR use:
# $ launchctl setenv STUDIO_JDK /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk
#
export STUDIO_JDK=/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk
@viktorbenei
viktorbenei / vb.monit.plist
Last active December 25, 2022 18:40
Monit OS X Launch Agent Plist file
<!--
Don't forget to set the /path/to/.monitrc path!
* Save this into: ~/Library/LaunchAgents/vb.monit.plist
* Load with (auto loaded at user login): launchctl load ~/Library/LaunchAgents/vb.monit.plist
* Unload with: launchctl unload ~/Library/LaunchAgents/vb.monit.plist
-->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>