Merge pull request #8 from lbryio/grin

grin's attempts at getting release.py working
This commit is contained in:
Job Evers‐Meltzer 2017-03-06 07:29:17 -06:00 committed by GitHub
commit ecec1ba5c8
17 changed files with 40 additions and 39 deletions

17
.gitignore vendored
View file

@ -1,10 +1,13 @@
app/dist
app/node_modules
node_modules
LBRY-darwin-x64
dist
lbrynet/build
lbrynet/venv
.#*
build_venv
*.pyc
/app/dist
/app/node_modules
/build_venv
/lbrynet-daemon/build
/lbrynet-daemon/venv
/.idea
*.pyc
.#*

View file

@ -121,7 +121,7 @@ function shutdownDaemon() {
// TODO: In this case, we didn't start the process so I'm hesitant
// to shut it down. We might want to send a stop command
// though instead of just letting it run.
console.log('Not killing lbrynet because we did not start it')
console.log('Not killing lbrynet daemon because we did not start it')
return
}
if (win) {

View file

@ -22,7 +22,7 @@ install:
- npm install
- cd ..
# create lbrynet-daemon executable
- cd lbrynet
- cd lbrynet-daemon
- ps: .\build.ps1
- cd ..
# build ui
@ -32,7 +32,7 @@ install:
- node_modules\.bin\webpack
- ps: Copy-Item dist ..\app\ -recurse
- cd ..
- ps: Copy-Item lbrynet\dist\lbrynet-daemon.exe app\dist
- ps: Copy-Item lbrynet-daemon\dist\lbrynet-daemon.exe app\dist
build_script:
# build electron app

View file

@ -4,6 +4,8 @@ set -o xtrace
set -eu
ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$ROOT"
if [ "$(uname)" == "Darwin" ]; then
ICON="$ROOT/build/icon.icns"
else
@ -11,9 +13,7 @@ else
fi
FULL_BUILD="${FULL_BUILD:-false}"
if [ -n "${TEAMCITY_VERSION:-}" ]; then
FULL_BUILD="true"
elif [ -n "${APPVEYOR:-}" ]; then
if [ -n "${TEAMCITY_VERSION:-}" -o -n "${APPVEYOR:-}" ]; then
FULL_BUILD="true"
fi
@ -30,18 +30,19 @@ if [ "$FULL_BUILD" == "true" ]; then
source "$VENV/bin/activate"
set -u
pip install -U pip setuptools pyinstaller
python set_version.py
python set_build.py
python "$ROOT/set_version.py"
python "$ROOT/set_build.py"
fi
npm install
pushd $ROOT/app
npm install
popd
(
cd "$ROOT/app"
npm install
)
(
cd "$ROOT/lbrynet"
pip install -r posix.txt
cd "$ROOT/lbrynet-daemon"
pip install -r linux_macos.txt
pyinstaller -y lbry.onefile.spec
)
@ -54,7 +55,7 @@ popd
cp -r dist "$ROOT/app/dist"
)
mv "$ROOT/lbrynet/dist/lbrynet-daemon" "$ROOT/app/dist"
mv "$ROOT/lbrynet-daemon/dist/lbrynet-daemon" "$ROOT/app/dist"
if [ "$FULL_BUILD" == "true" ]; then

View file

@ -66,7 +66,7 @@ def bump(changelog, version):
continue
if CHANGELOG_ERROR_RE.search(line):
raise Exception(
'Failed to parse {}: {}'.format(filename, 'unexpected section header found'))
'Failed to parse {}: {}'.format(changelog, 'unexpected section header found'))
unreleased.append(line)
today = datetime.datetime.today()

Binary file not shown.

View file

@ -6,7 +6,7 @@ import lbryum
cwd = os.getcwd()
if os.path.basename(cwd) != 'lbrynet':
if os.path.basename(cwd) != 'lbrynet-daemon':
raise Exception('The build needs to be run from the same directory as the spec file')
repo_base = os.path.abspath(os.path.join(cwd, '..'))

View file

@ -10,7 +10,7 @@ googlefinance==0.7
jsonrpc==1.2
jsonrpclib==0.1.7
jsonschema==2.5.1
# for electron, we install lbryum, lbrynet using submodules
# for electron, we install lbryum, lbry using submodules
../lbryum
../lbry
pbkdf2==1.3

View file

@ -158,7 +158,7 @@ def is_behind(base, branch):
def check_bumpversion():
def requireNewVersion():
def require_new_version():
print 'Install bumpversion: pip install -U git+https://github.com/lbryio/bumpversion.git'
sys.exit(1)
@ -166,15 +166,14 @@ def check_bumpversion():
output = subprocess.check_output(['bumpversion', '-v'], stderr=subprocess.STDOUT)
output = output.strip()
if output != 'bumpversion 0.5.4-lbry':
requireNewVersion()
require_new_version()
except (subprocess.CalledProcessError, OSError) as err:
requireNewVersion()
require_new_version()
def get_part(args, name):
if name == 'lbry-web-ui':
part = getattr(args, 'ui_part')
return part or args.lbry_part
return args.ui_part or args.lbry_part
else:
return getattr(args, name + '_part')

View file

@ -1,15 +1,11 @@
import argparse
import glob
import json
import logging
import os
import platform
import random
import re
import subprocess
import sys
import github
import requests
import uritemplate
@ -17,8 +13,7 @@ import uritemplate
from lbrynet.core import log_support
def main(args=None):
current_tag = None
def main():
try:
current_tag = subprocess.check_output(
['git', 'describe', '--exact-match', 'HEAD']).strip()
@ -133,7 +128,7 @@ def _curl_uploader(upload_uri, asset_to_upload, token):
'--data-binary', '@-',
upload_uri
]
#'-d', '{"some_key": "some_value"}',
# '-d', '{"some_key": "some_value"}',
print 'Calling curl:'
print cmd
print

4
requirements.txt Normal file
View file

@ -0,0 +1,4 @@
GitPython==2.1.1
PyGithub==1.32
requests==2.13.0
git+https://github.com/lbryio/bumpversion.git

View file

@ -1,6 +1,5 @@
"""Set the build version to be 'dev', 'qa', 'rc', 'release'"""
import json
import os.path
import re
import subprocess

View file

@ -19,9 +19,9 @@ def main():
def get_system_label():
system = platform.system()
if system == 'Darwin':
return 'macOS'
return 'macos'
else:
return system
return system.lower()
if __name__ == '__main__':