Cleanup maven_deploy, maven_install build rules
Use GERRIT_VERSION rather than GERRIT_VER. VER is not a commonly used term to name the version string of a software product; VERSION is. Make the maven_deploy and maven_install rules a little more typical by passing in the target name separate from the action. Change-Id: I13a5d94cf5b078cfcb91c69177cadfc2953db33e
This commit is contained in:
4
BUCK
4
BUCK
@@ -20,8 +20,8 @@ genrule(
|
|||||||
out = '__fake.api__',
|
out = '__fake.api__',
|
||||||
)
|
)
|
||||||
|
|
||||||
maven_install(deps = API_DEPS)
|
maven_install(name = 'api_install', deps = API_DEPS)
|
||||||
maven_deploy(deps = API_DEPS)
|
maven_deploy(name = 'api_deploy', deps = API_DEPS)
|
||||||
|
|
||||||
java_binary(name = 'extension-api', deps = [':extension-lib'])
|
java_binary(name = 'extension-api', deps = [':extension-lib'])
|
||||||
java_library(
|
java_library(
|
||||||
|
6
VERSION
6
VERSION
@@ -1 +1,5 @@
|
|||||||
GERRIT_VER = '2.8-SNAPSHOT'
|
# Maven style API version (e.g. '2.x-SNAPSHOT').
|
||||||
|
# Used by :api_install and :api_deploy targets
|
||||||
|
# when talking to the destination repository.
|
||||||
|
#
|
||||||
|
GERRIT_VERSION = '2.8-SNAPSHOT'
|
||||||
|
@@ -78,31 +78,22 @@ def gerrit_war(name, ui = 'ui_optdbg', context = []):
|
|||||||
] + context,
|
] + context,
|
||||||
)
|
)
|
||||||
|
|
||||||
def maven_deploy(
|
def maven_deploy(name, deps):
|
||||||
deps
|
_maven_util(name, 'deploy', deps)
|
||||||
):
|
|
||||||
_maven_util('deploy', deps)
|
|
||||||
|
|
||||||
def maven_install(
|
def maven_install(name, deps):
|
||||||
deps
|
_maven_util(name, 'install', deps)
|
||||||
):
|
|
||||||
_maven_util(
|
|
||||||
name = 'install',
|
|
||||||
deps = deps)
|
|
||||||
|
|
||||||
def _maven_util(
|
def _maven_util(name, action, deps):
|
||||||
name,
|
|
||||||
deps
|
|
||||||
):
|
|
||||||
cmd = [
|
cmd = [
|
||||||
'$(exe //tools:maven_deploy)',
|
'$(exe //tools:maven_deploy)',
|
||||||
'-a', name,
|
'-a', action,
|
||||||
'-v', GERRIT_VER,
|
'-v', GERRIT_VERSION,
|
||||||
'-d', '"$DEPS"'
|
'-d', '"$DEPS"'
|
||||||
]
|
]
|
||||||
genrule(
|
genrule(
|
||||||
name = 'api_%s' % name,
|
name = name,
|
||||||
cmd = ' '.join(cmd),
|
cmd = ' '.join(cmd),
|
||||||
deps = deps + ['//tools:maven_deploy'],
|
deps = deps + ['//tools:maven_deploy'],
|
||||||
out = '__fake.api_%s__' % name
|
out = '__fake.%s__' % name
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user