Docker-in-Docker (DinD) capabilities of public runners deactivated. More info

Commit 7ea9c85b authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Start release candidate 0.9.1

parent 3749deae
0.9.0
\ No newline at end of file
0.9.1
\ No newline at end of file
......@@ -3,10 +3,16 @@
Configure the build process for the plugin dbui
"""
import datetime
import os
import re
import tempfile
from subprocess import call, check_output
from IPython.utils.io import stderr
NOW = datetime.datetime.now()
# ............................................................................
#
# JAVASCRIPT LIBRARY
......@@ -92,9 +98,10 @@ PLUGINS_FILES["mathjax"] = [
# ............................................................................
#
# REFERENCE FILES
# - path are relative to the static repository
#
DBUIJS = "plugin_dbui/src/Dbui.js"
CHANGELOG = "static/plugin_dbui/CHANGELOG"
DBUIJS = "static/plugin_dbui/src/Dbui.js"
VERSION = "VERSION"
def commit_release():
......@@ -104,21 +111,18 @@ def commit_release():
print "\n", "."*79
print "\n\tCommit CHANGELOG, DBUIJS, VERSION, ..."
if not which("git", localhost=True):
error('\n\tThe application git is missing !')
print '\tSkip this step.\n'
return
# move to the master branch
git("checkout master")
with tempfile.TemporaryFile() as fi:
print "\tMove to the master branch"
call(["git", "checkout", "master"], stdout=fi, stderr=fi)
# Commit modified files
print '\n\tgit add', DBUIJS, CHANGELOG, VERSION
git("add", DBUIJS, CHANGELOG, VERSION)
call(["git", "add", DBUIJS, CHANGELOG, VERSION])
msg = "Start release candidate %s" % get_version()
print '\tgit commit:', msg
git("commit -m", msg)
call(["git", "commit", "-m", msg])
......@@ -136,7 +140,7 @@ def get_plugin_version(plugin):
os.chdir("static/plugin_ace")
with tempfile.TemporaryFile() as tmpfile:
git("describe --tags", stdout=tmpfile)
call(["git", "describe", "--tags"], stdout=tmpfile)
tmpfile.seek(0)
......@@ -146,9 +150,8 @@ def get_plugin_version(plugin):
os.chdir(cwd)
elif plugin == "dbui":
filename = os.path.join("static", DBUIJS)
with open(filename, "rb") as tmpfile:
with open(DBUIJS, "rb") as tmpfile:
text = tmpfile.read()
match = re.match(r"(.+ version: ')([\w._-]*)('.+)", text, re.DOTALL)
......@@ -181,7 +184,7 @@ def get_plugin_version(plugin):
match = re.match(r'.+MathJax.version="(\d+(\.\d+)*)";', text, re.DOTALL)
if not match:
error("\n\tMathJax release number not defined !")
sys;exit(1)
sys.exit(1)
release = match.group(1)
......@@ -199,6 +202,17 @@ def get_plugin_version(plugin):
return release
def get_version():
"""Get the current release identifier in VERSION.
Returns:
str: the version number
"""
with open(VERSION, "rb") as fi:
return fi.read()
def set_version(version):
"""Set release identifier in CHANGELOG, VERSION and Dbui.js
......@@ -207,14 +221,14 @@ def set_version(version):
"""
print "\n", "."*79
print "Update CHANGELOG and Dbui.js files with release", version, "..."
print "\tUpdate CHANGELOG and Dbui.js files with release", version, "..."
# check tag in git
if version in check_output(["git", "tag"]).split("\n"):
print "\n\tRelease %s already exit in git" % version
sys.exit(1)
print 'Set release', version, 'in', DBUIJS
print '\tSet release', version, 'in', DBUIJS
with open(DBUIJS) as fi:
txt = fi.read()
......@@ -225,7 +239,7 @@ def set_version(version):
if match.group(2) == version:
msg = '\n\tVersion "%s" already exists in the Dbui.js file !'
print msg % version
rep = raw_input('\tDo you want to continue [n]?')
rep = raw_input('\tDo you want to continue [n]? ')
if rep not in ('y', 'yes'):
sys.exit(1)
......@@ -236,7 +250,7 @@ def set_version(version):
# look for a pattern HEAD in the CHANGELOG
# split the the string in 2 parts (pre HEAD, post HEAD)
print 'Set release', version, 'in', CHANGELOG
print '\tSet release', version, 'in', CHANGELOG
with open(CHANGELOG) as fi:
txt = fi.read()
......@@ -258,7 +272,7 @@ def set_version(version):
call(["vim", CHANGELOG])
# update VERSION
print 'Set release', version, 'in', VERSION
print '\tSet release', version, 'in', VERSION
with open(VERSION, 'w') as fi:
fi.write(version)
......
--------------------------------- CHANGE LOG ----------------------------------
HEAD
0.9.1 (Aug 2016)
- Migrate to Ext JS 6.0.1.250
- Migrate to the new build system: w2pext/utilities/build_version6.py
- Migrate to the new build system build-version6 in w2pext/utilities.
0.9.0 (Jun 2016)
- Change the name space for the JavaScript code from App to Dbui.
......
......@@ -15,7 +15,7 @@ Ext.define('Dbui', {
* The version of the plugin
* @property {String}
*/
version: '0.9.0',
version: '0.9.1',
/**
* The name of the application
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment