fix lbryum release without tag

This commit is contained in:
Alex Grintsvayg 2017-03-09 10:33:18 -05:00
parent b71382d276
commit f8a2a03ae8
2 changed files with 21 additions and 15 deletions

14
fix_submodule_urls.sh Normal file
View file

@ -0,0 +1,14 @@
#!/bin/bash
# https://github.com/lbryio/lbry-app/commit/4386102ba3bf8c731a075797756111d73c31a47a
# https://github.com/lbryio/lbry-app/commit/a3a376922298b94615f7514ca59988b73a522f7f
# Appveyor and Teamcity struggle with SSH urls in submodules, so we use HTTPS
# But locally, SSH urls are way better since they dont require a password
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "DIR"
git config submodule.lbry.url git@github.com:lbryio/lbry.git
git config submodule.lbryum.url git@github.com:lbryio/lbryum.git
git config submodule.lbry-web-ui.url git@github.com:lbryio/lbry-web-ui.git

View file

@ -16,7 +16,6 @@ import requests
import changelog import changelog
NO_CHANGE = ('No change since the last release. This release is simply a placeholder' NO_CHANGE = ('No change since the last release. This release is simply a placeholder'
' so that LBRY and LBRY App track the same version') ' so that LBRY and LBRY App track the same version')
TOKEN_MSG = """ TOKEN_MSG = """
@ -94,8 +93,7 @@ def main():
repos = {name: Repo(name, get_part(args, name)) for name in names} repos = {name: Repo(name, get_part(args, name)) for name in names}
# in order to see if we've had any change in the submodule, we need to checkout # in order to see if we've had any change in the submodule, we need to checkout
# our last release, see what commit we were on, and then compare that to # our last release, see what commit we were on, and then compare that to current
# current
base.git.checkout(last_release) base.git.checkout(last_release)
base.git.submodule('update') base.git.submodule('update')
for repo in repos.values(): for repo in repos.values():
@ -108,10 +106,6 @@ def main():
get_lbryum_part_if_needed(repos['lbryum']) get_lbryum_part_if_needed(repos['lbryum'])
# bumpversion will fail if there is already the tag we want in the repo
for repo in repos.values():
repo.assert_new_tag_is_absent()
for repo in repos.values(): for repo in repos.values():
logging.info('Processing repo: %s', repo.name) logging.info('Processing repo: %s', repo.name)
repo.checkout(args.branch) repo.checkout(args.branch)
@ -133,6 +127,8 @@ def main():
# them even if there aren't any changes, but lbryum should only be # them even if there aren't any changes, but lbryum should only be
# bumped if it has changes # bumped if it has changes
continue continue
# bumpversion will fail if there is already the tag we want in the repo
repo.assert_new_tag_is_absent()
repo.bumpversion() repo.bumpversion()
release_msg = get_release_msg(changelogs, names) release_msg = get_release_msg(changelogs, names)
@ -169,8 +165,7 @@ def get_gh_token():
def get_lbryum_part_if_needed(repo): def get_lbryum_part_if_needed(repo):
if repo.has_changes(): if repo.has_changes() and not repo.part:
if not repo.part:
get_lbryum_part(repo) get_lbryum_part(repo)
@ -223,7 +218,6 @@ def is_behind(base, branch):
def check_bumpversion(): def check_bumpversion():
def require_new_version(): def require_new_version():
print 'Install bumpversion: pip install -U git+https://github.com/lbryio/bumpversion.git' print 'Install bumpversion: pip install -U git+https://github.com/lbryio/bumpversion.git'
sys.exit(1) sys.exit(1)
@ -238,10 +232,8 @@ def check_bumpversion():
def get_part(args, name): def get_part(args, name):
if name == 'lbry-web-ui': value = args.ui_part if name == 'lbry-web-ui' else getattr(args, name + '_part')
return args.ui_part or args.lbry_part return value or args.lbry_part
else:
return getattr(args, name + '_part')
class Repo(object): class Repo(object):