1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-28 08:13:17 +03:00
vimr/bin/build_snapshot.sh

46 lines
1.2 KiB
Bash
Raw Normal View History

#!/bin/bash
set -e
export PATH=/usr/local/bin:$PATH
# delete all (local) branches
git for-each-ref --format="%(refname:strip=2)" refs/heads/ | xargs git branch -D
git checkout -b build_snapshot
# delete previously built VimR
rm -rf build
git submodule update --init
# delete previously built libnvim
pushd neovim
ln -f -s ../local.mk .
2016-07-16 23:42:43 +03:00
rm -rf build
make clean
make CMAKE_BUILD_TYPE=Release libnvim
popd
carthage update --platform osx
./bin/bump_bundle_version.sh
./bin/set_snapshot_date.sh
xcodebuild CODE_SIGN_IDENTITY="Developer ID Application: Tae Won Ha (H96Q2NKTQH)" -configuration Release -target VimR
CUR_MARKETING_VERSION=$(./bin/current_marketing_version.sh)
CUR_BUNDLE_VERSION=$(./bin/current_bundle_version.sh)
2016-07-17 21:17:56 +03:00
SNAPSHOT_DATE=$(date +%Y%m%d.%H%M)
TAG_NAME=snapshot/${SNAPSHOT_DATE}-${CUR_BUNDLE_VERSION}
git commit -am "Set snapshot version: $CUR_MARKETING_VERSION-$CUR_BUNDLE_VERSION"
2016-07-17 21:17:56 +03:00
git tag -a -m "$CUR_MARKETING_VERSION ($CUR_BUNDLE_VERSION)" snapshot/${SNAPSHOT_DATE}-${CUR_BUNDLE_VERSION}
2016-07-16 22:47:07 +03:00
pushd build/Release
tar cjf VimR-${CUR_MARKETING_VERSION}.tar.bz2 VimR.app
tar cjf SwiftNeoVim.framework-${CUR_MARKETING_VERSION}.tar.bz2 SwiftNeoVim.framework
popd
git push origin HEAD:${BRANCH}
git push origin ${TAG_NAME}