-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release 0.5.0 (via new script) (#49)
- Loading branch information
Showing
5 changed files
with
105 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Pod::Spec.new do |spec| | ||
spec.name = 'JJFloatingActionButton' | ||
spec.version = '0.4.0' | ||
spec.version = '0.5.0' | ||
spec.author = { 'Jochen Pfeiffer' => '[email protected]' } | ||
spec.license = { :type => 'MIT', :file => 'LICENSE' } | ||
spec.homepage = 'https://github.com/jjochen/JJFloatingActionButton' | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
|
||
function fancy_echo | ||
{ | ||
echo "" | ||
echo $1 | ||
} | ||
|
||
function usage | ||
{ | ||
cat << EOF | ||
usage: $0 options | ||
OPTIONS: | ||
-h Show this message | ||
-v Version | ||
EOF | ||
} | ||
|
||
function check_arguments | ||
{ | ||
while getopts "hv:" OPTION | ||
do | ||
case ${OPTION} in | ||
h) | ||
usage | ||
exit | ||
;; | ||
v) | ||
version=${OPTARG} | ||
echo "Version number: ${version}" | ||
;; | ||
?) | ||
usage | ||
exit | ||
;; | ||
esac | ||
done | ||
|
||
if [[ -z ${version} ]] | ||
then | ||
fancy_echo "ERROR: Version number (-v) has to be specified" | ||
usage | ||
exit 1 | ||
fi | ||
} | ||
|
||
function update_change_log | ||
{ | ||
fancy_echo "Update Change Log" | ||
github_changelog_generator --future-release ${version} | ||
} | ||
|
||
function update_podspec | ||
{ | ||
fancy_echo "Update Pod Spec" | ||
sed -i "" -e "s/\(spec\.version.*\)'.*'/\1'${version}'/" JJFloatingActionButton.podspec | ||
# sed -i -E "s/\(spec\.version\s*=\s*\)'.*'/\1'${version}'/" JJFloatingActionButton.podspec | ||
} | ||
|
||
function install_example_pods | ||
{ | ||
fancy_echo "Install cocoapods in Example" | ||
bundle exec pod install --project-directory=Example | ||
} | ||
|
||
function update_example_version | ||
{ | ||
fancy_echo "Update Version in Example" | ||
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${version}" Example/JJFloatingActionButton/Info.plist | ||
} | ||
|
||
|
||
check_arguments $* | ||
update_podspec | ||
update_change_log | ||
install_example_pods | ||
update_example_version | ||
|