fix lbryum release without tag
This commit is contained in:
parent
b71382d276
commit
f8a2a03ae8
2 changed files with 21 additions and 15 deletions
14
fix_submodule_urls.sh
Normal file
14
fix_submodule_urls.sh
Normal 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
|
22
release.py
22
release.py
|
@ -16,7 +16,6 @@ import requests
|
|||
|
||||
import changelog
|
||||
|
||||
|
||||
NO_CHANGE = ('No change since the last release. This release is simply a placeholder'
|
||||
' so that LBRY and LBRY App track the same version')
|
||||
TOKEN_MSG = """
|
||||
|
@ -94,8 +93,7 @@ def main():
|
|||
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
|
||||
# our last release, see what commit we were on, and then compare that to
|
||||
# current
|
||||
# our last release, see what commit we were on, and then compare that to current
|
||||
base.git.checkout(last_release)
|
||||
base.git.submodule('update')
|
||||
for repo in repos.values():
|
||||
|
@ -108,10 +106,6 @@ def main():
|
|||
|
||||
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():
|
||||
logging.info('Processing repo: %s', repo.name)
|
||||
repo.checkout(args.branch)
|
||||
|
@ -133,6 +127,8 @@ def main():
|
|||
# them even if there aren't any changes, but lbryum should only be
|
||||
# bumped if it has changes
|
||||
continue
|
||||
# bumpversion will fail if there is already the tag we want in the repo
|
||||
repo.assert_new_tag_is_absent()
|
||||
repo.bumpversion()
|
||||
|
||||
release_msg = get_release_msg(changelogs, names)
|
||||
|
@ -169,9 +165,8 @@ def get_gh_token():
|
|||
|
||||
|
||||
def get_lbryum_part_if_needed(repo):
|
||||
if repo.has_changes():
|
||||
if not repo.part:
|
||||
get_lbryum_part(repo)
|
||||
if repo.has_changes() and not repo.part:
|
||||
get_lbryum_part(repo)
|
||||
|
||||
|
||||
def get_lbryum_part(repo):
|
||||
|
@ -223,7 +218,6 @@ def is_behind(base, branch):
|
|||
|
||||
|
||||
def check_bumpversion():
|
||||
|
||||
def require_new_version():
|
||||
print 'Install bumpversion: pip install -U git+https://github.com/lbryio/bumpversion.git'
|
||||
sys.exit(1)
|
||||
|
@ -238,10 +232,8 @@ def check_bumpversion():
|
|||
|
||||
|
||||
def get_part(args, name):
|
||||
if name == 'lbry-web-ui':
|
||||
return args.ui_part or args.lbry_part
|
||||
else:
|
||||
return getattr(args, name + '_part')
|
||||
value = args.ui_part if name == 'lbry-web-ui' else getattr(args, name + '_part')
|
||||
return value or args.lbry_part
|
||||
|
||||
|
||||
class Repo(object):
|
||||
|
|
Loading…
Reference in a new issue