This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# current Git branch | |
branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') | |
# v1.0.0, v1.5.2, etc. | |
versionLabel=v$1 | |
# establish branch and tag name variables | |
devBranch=develop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func wordRangeAtIndex(index:Int, inString str:NSString) -> NSRange { | |
let tagger = NSLinguisticTagger(tagSchemes: [NSLinguisticTagSchemeTokenType], options: 0) | |
var r : NSRange = NSMakeRange(0,0) | |
tagger.string = str as String | |
tagger.tagAtIndex(index, scheme: NSLinguisticTagSchemeTokenType, tokenRange: &r, sentenceRange: nil ) | |
return r | |
} | |
func wordAtIndex(index:Int, inString str:NSString) -> NSString { | |
return str.substringWithRange(wordRangeAtIndex(index, inString: str)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Assuming you have a master and dev branch, and that you make new | |
# release branches named as the version they correspond to, e.g. 1.0.3 | |
# Usage: ./release.sh 1.0.3 | |
# Get version argument and verify | |
version=$1 | |
if [ -z "$version" ]; then | |
echo "Please specify a version" |