Skip to content
Snippets Groups Projects
Commit 82782d27 authored by Renaud Le Gac's avatar Renaud Le Gac
Browse files

The buildVersion script is completed and includes the production of

the plugin binary file as well as  editing of CHANGELOG
parent 614b5409
No related branches found
No related tags found
No related merge requests found
...@@ -18,43 +18,43 @@ ...@@ -18,43 +18,43 @@
Build debug and minified version of the javascript library. Build debug and minified version of the javascript library.
Commit the new version in git and tag it Commit the new version in git and tag it
Build the web2py plugin file Build the web2py plugin file
OPTIONS
--help, -h
print a short help file.
-n
dry run
EXAMPLES EXAMPLES
> buildVersion > buildVersion -h
> buildVersion 0.4.3 > buildVersion 0.4.3
AUTHOR AUTHOR
R. Le Gac, renaud.legac@free.fr R. Le Gac, renaud.legac@free.fr
Copyright (c) 2012 R. Le Gac
""" """
import datetime
import optparse import optparse
import os import os
import re import re
import subprocess import subprocess
import sys import sys
import urllib2 import urllib
from datetime import datetime print '\nStart buildVersion'
print 'start buildVersion'
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# constants
#
APP = 'mygit_dbui_04x' APP = 'mygit_dbui_04x'
CHANGELOG = 'static/plugin_dbui/CHANGELOG' CHANGELOG = 'static/plugin_dbui/CHANGELOG'
DBUI_W2P = 'web2py.plugin.dbui.w2p'
JSBASE = 'static/plugin_dbui/src/appbase.js' JSBASE = 'static/plugin_dbui/src/appbase.js'
JSLIBDEBUG = 'static/plugin_dbui/dbui-debug.js' JSLIBDEBUG = 'static/plugin_dbui/dbui-debug.js'
JSLIBMIN = 'static/plugin_dbui/dbui-min.js' JSLIBMIN = 'static/plugin_dbui/dbui-min.js'
JSLIBSRC = 'static/plugin_dbui/src' JSLIBSRC = 'static/plugin_dbui/src'
PACK_PLUGIN_URL = 'http://localhost:8000/admin/default/pack_plugin/%s/dbui' % APP NOW = datetime.datetime.now()
PACK_PLUGIN_URL = 'http://localhost:8000/%s/default/pack_plugin' % APP
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# define main applications # define main applications
# #
...@@ -132,9 +132,10 @@ if not (opt.update or opt.git or opt.yuicompressor or opt.web2py): ...@@ -132,9 +132,10 @@ if not (opt.update or opt.git or opt.yuicompressor or opt.web2py):
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# clean previous build # clean previous build
if opt.clean: if opt.clean:
os.remove(DBUI_W2P)
os.remove(JSLIBDEBUG) os.remove(JSLIBDEBUG)
os.remove(JSLIBMIN) os.remove(JSLIBMIN)
print 'files', JSLIBDEBUG, JSLIBMIN, 'were removed.' print 'files', DBUI_W2P, JSLIBDEBUG, JSLIBMIN, 'removed.'
sys.exit(0) sys.exit(0)
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
...@@ -172,11 +173,11 @@ if opt.update: ...@@ -172,11 +173,11 @@ if opt.update:
print s print s
# look for a pattern HEAD in the CHANGELOG # look for a pattern HEAD in the CHANGELOG
# split the the string in 3 parts (pre, HEAD, post) # split the the string in 2 parts (pre HEAD, post HEAD)
print 'Modified', CHANGELOG print 'Modified', CHANGELOG
s = open(CHANGELOG, 'rb').read() s = open(CHANGELOG, 'rb').read()
m = re.match("(.+)(HEAD\n)(.*)", s, re.DOTALL) m = re.match("(.+HEAD\n)(.*)", s, re.DOTALL)
if m == None: if m == None:
print '\n\tNo HEAD tag in the CHANGELOG!\n' print '\n\tNo HEAD tag in the CHANGELOG!\n'
...@@ -184,12 +185,13 @@ if opt.update: ...@@ -184,12 +185,13 @@ if opt.update:
if rep not in ('y', 'yes'): if rep not in ('y', 'yes'):
sys.exit(1) sys.exit(1)
# update the version and write a new file # update the version and edit the CHANGELOG
s = '%s%s (%s)\n%s' % (m.group(1), version, datetime.now().strftime('%b %Y'), m.group(3)) s = '%s\n%s (%s)\n%s' % (m.group(1), version, NOW.strftime('%b %Y'), m.group(2))
if opt.run: if opt.run:
fi = open(CHANGELOG, 'wb') fi = open(CHANGELOG, 'wb')
fi.write(s) fi.write(s)
fi.close() fi.close()
subprocess.call(["vim", CHANGELOG])
else: else:
print s print s
...@@ -230,20 +232,16 @@ if opt.web2py: ...@@ -230,20 +232,16 @@ if opt.web2py:
# build the web2py plugin # build the web2py plugin
print 'Build the web2py plugin binary file' print 'Build the web2py plugin binary file'
raw_input('Check that the web2py service is running ? Type CR to continue.') raw_input('Check that the web2py service is running ? Type CR to continue.')
# f = urllib.urlopen(PACK_PLUGIN_URL) f = urllib.urlopen(PACK_PLUGIN_URL)
# print f.read() s = f.read()
auth_handler = urllib2.HTTPBasicAuthHandler()
auth_handler.add_password(realm='web2py', fi = open(DBUI_W2P, 'wb')
uri='http://localhost:8000/admin', fi.write(s)
user='admin', fi.close()
passwd='f') print 'file', DBUI_W2P, 'is written.'
opener = urllib2.build_opener(auth_handler)
urllib2.install_opener(opener)
f = urllib2.urlopen(PACK_PLUGIN_URL)
print f.read()
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# exit # exit
# #
print 'Exit buidVersion' print 'Exit buidVersion\n'
sys.exit(0) sys.exit(0)
\ No newline at end of file
""" $Id$ """ """ """
from gluon.admin import plugin_pack
def index(): def index():
"""Main Controller to run the application. """Main Controller to run the application.
""" """
return LOAD('plugin_dbui', 'index', vars=request.vars) return LOAD('plugin_dbui', 'index', vars=request.vars)
def pack_plugin():
"""Helper controller to produce the plugin_dbui binary version.
Used by the script buildVersion when building a new release.
Light version of the appadmin/default/pack_plugin controller.
"""
pname = 'dbui'
fname = 'web2py.plugin.%s.w2p' %pname
filename = plugin_pack(request.application, pname, request)
if filename:
response.headers['Content-Type'] = 'application/w2p'
disposition = 'attachment; filename=%s' % fname
response.headers['Content-Disposition'] = disposition
fi = open(filename, 'rb')
try:
return fi.read()
finally:
fi.close()
else:
return None
\ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
HEAD HEAD
- script to build the and tag a new version of plugin_dbui - script to build the and tag a new version of plugin_dbui
4.3.0 (Dec 11) 4.3.0 (Dec 2011)
- Major change which is not backward compatible - Major change which is not backward compatible
- Add mechanism to transport database validators on the client side. - Add mechanism to transport database validators on the client side.
- Improve the GridModifier to modify column parameters. - Improve the GridModifier to modify column parameters.
...@@ -22,19 +22,19 @@ HEAD ...@@ -22,19 +22,19 @@ HEAD
- Add the helper function is_mathjax - Add the helper function is_mathjax
- Bugs fixed - Bugs fixed
0.4.2 (Oct 11) 0.4.2 (Oct 2011)
- Migrate to git and to ExtJS 3.4 - Migrate to git and to ExtJS 3.4
- Backport the modifiers syntax developped in the branch 0.5.x - Backport the modifiers syntax developped in the branch 0.5.x
- Backport the 0.5.x look and feel for the row editor contex menu - Backport the 0.5.x look and feel for the row editor contex menu
- Bugs fixed - Bugs fixed
0.4.1 (Apr 11) 0.4.1 (Apr 2011)
- Bugs fixed. - Bugs fixed.
- Add local files (fr-fr) for client and server sides. - Add local files (fr-fr) for client and server sides.
- Use the same sequence to load MathJax and ExtJS libraries. - Use the same sequence to load MathJax and ExtJS libraries.
- Move to MathJax 1.1.0 - Move to MathJax 1.1.0
0.4.0 (Mar 11) 0.4.0 (Mar 2011)
- Major Consolidation to ease evolution and maintenance. - Major Consolidation to ease evolution and maintenance.
- Introduce the generic service directSvc to handle Ext.Direct protocol - Introduce the generic service directSvc to handle Ext.Direct protocol
and remove database and configuration controllers. and remove database and configuration controllers.
...@@ -49,7 +49,7 @@ HEAD ...@@ -49,7 +49,7 @@ HEAD
- New button App.ButtonDownlod in order to download file from the server. - New button App.ButtonDownlod in order to download file from the server.
- Add the version number id appbase.js - Add the version number id appbase.js
0.3.2 (Jan 11) 0.3.2 (Jan 2011)
- Update the user documentation. - Update the user documentation.
- Plugin parameters for the application javascript source code and library. - Plugin parameters for the application javascript source code and library.
- Scripting capabilities are move to the plugin to the application layer - Scripting capabilities are move to the plugin to the application layer
...@@ -57,14 +57,14 @@ HEAD ...@@ -57,14 +57,14 @@ HEAD
- Forms can be customized using embedded panels, i.e tabPanel. - Forms can be customized using embedded panels, i.e tabPanel.
- Few bugs fixed - Few bugs fixed
0.3.1 (Jan 11) 0.3.1 (Jan 2011)
- refactoring the javascript code to be compliant with JSLint. - refactoring the javascript code to be compliant with JSLint.
- rename some python methods to be compliant with the PEP8 recommendation. - rename some python methods to be compliant with the PEP8 recommendation.
- Introduce new Modifier tools based on classes to customize widgets. - Introduce new Modifier tools based on classes to customize widgets.
- Remove the first set of the Modifier tools based on function. - Remove the first set of the Modifier tools based on function.
- Few bugs fixed - Few bugs fixed
0.3.0 (Dec 10) 0.3.0 (Dec 2010)
- Customization of widgets and applications via the python model. - Customization of widgets and applications via the python model.
Add many tools to help in the configuration at the python level. Add many tools to help in the configuration at the python level.
- Add a plugin to handle grid with paging. - Add a plugin to handle grid with paging.
...@@ -74,7 +74,7 @@ HEAD ...@@ -74,7 +74,7 @@ HEAD
- Move to Ext JS 3.3.1 - Move to Ext JS 3.3.1
- Add a minified version of the library. - Add a minified version of the library.
0.2.3 (Nov 10) 0.2.3 (Nov 2010)
- The configuration service handles the attributes Label, comment, readable, - The configuration service handles the attributes Label, comment, readable,
writable and widget from the SQLField class. writable and widget from the SQLField class.
Therefore automatic labeling have been removed for foreign keys. Therefore automatic labeling have been removed for foreign keys.
...@@ -85,19 +85,19 @@ HEAD ...@@ -85,19 +85,19 @@ HEAD
- Use the widget numberfield for integer and double. - Use the widget numberfield for integer and double.
- Add internationalization for table and field names. - Add internationalization for table and field names.
0.2.2 (Oct 10) 0.2.2 (Oct 2010)
- Migrate to web2py 1.88.1 and ExtJS 3.3.0 - Migrate to web2py 1.88.1 and ExtJS 3.3.0
- Transform the code as a web2py plugin with the name plugin_dbui. - Transform the code as a web2py plugin with the name plugin_dbui.
- Add the dependence to the plugin_extjs. - Add the dependence to the plugin_extjs.
- Plug the CeCILL license and write the about. - Plug the CeCILL license and write the about.
0.2.1 (March10) 0.2.1 (March 2010)
- consolidation version - consolidation version
- improve protocol between the store and the database - improve protocol between the store and the database
allowing any kind of transactions: read, destroy, update, create and select. allowing any kind of transactions: read, destroy, update, create and select.
- restore the debug mode - restore the debug mode
0.2.0 (March 10) 0.2.0 (March 2010)
- Major redesign of the application. - Major redesign of the application.
- Migrate to web2py 1.75.1, ExtJS 3.1.1 and python 2.6. - Migrate to web2py 1.75.1, ExtJS 3.1.1 and python 2.6.
- New naming scheme for classes and plugins. - New naming scheme for classes and plugins.
...@@ -119,6 +119,4 @@ HEAD ...@@ -119,6 +119,4 @@ HEAD
0.1.1 0.1.1
- Tags revision 640 as 0.1.1 - Tags revision 640 as 0.1.1
- First prototype running with web2py 1.63 and ExtJS 2.2.1 (see also 0.1.0 log) - First prototype running with web2py 1.63 and ExtJS 2.2.1 (see also 0.1.0 log)
\ No newline at end of file
$Id$
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment