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_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 / .gitignore
Created January 17, 2015 08:32
Simple (minimal) Xcode .gitignore
# Mac OS X
*.DS_Store
# Xcode
xcuserdata/
@viktorbenei
viktorbenei / .bash_profile
Created January 19, 2015 10:23
OS X Terminal (coloring) improvements
# add these to ~/.bash_profile or another profile which is loaded
# from ~/.bash_profile (on OS X)
# source: http://osxdaily.com/2013/02/05/improve-terminal-appearance-mac-os-x/
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
# better default 'ls'
alias ls='ls -GFh'
@viktorbenei
viktorbenei / add_launchd_to_tcc.sh
Last active August 29, 2015 14:27 — forked from mtauraso/add_launchd_to_tcc.sh
TCC Database Script
#!/bin/bash
# This will add lauchd to the list of allowed processes for accessibility access
sudo sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db "INSERT or REPLACE INTO access VALUES('kTCCServiceAccessibility','/sbin/osascript',1,1,1,NULL)"
# This outputs the rows in the TCC database
sudo sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db 'select * from access'
echo "Restart is required for these changes to take effect"
#!/bin/bash
exit 1
#!/bin/bash
#
# Unlock the keychain, using the Bitrise.io Keychain password environment
#
keychain_path="$HOME/Library/Keychains/login.keychain"
keychain_password="$BITRISE_KEYCHAIN_PASSWORD"
set -e
@viktorbenei
viktorbenei / codesign-scan.sh
Last active December 22, 2015 10:29
Code Signing scan, based on the output of "xcodebuild .. clean archive"
#!/bin/bash
set -x
set -e
# use either the -project option, or the -workspace option but not both ;)
xcodebuild -project "YOUR.xcodeproj" OR -workspace "YOUR.xcworkspace" -scheme "a Shared scheme" clean archive | grep -i -e 'Signing Identity' -e 'Provisioning Profile' -e ' ('