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:
parent
1e6c3639f7
commit
3765bb8add
4
BUCK
4
BUCK
@ -20,8 +20,8 @@ genrule(
|
||||
out = '__fake.api__',
|
||||
)
|
||||
|
||||
maven_install(deps = API_DEPS)
|
||||
maven_deploy(deps = API_DEPS)
|
||||
maven_install(name = 'api_install', deps = API_DEPS)
|
||||
maven_deploy(name = 'api_deploy', deps = API_DEPS)
|
||||
|
||||
java_binary(name = 'extension-api', deps = [':extension-lib'])
|
||||
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,
|
||||
)
|
||||
|
||||
def maven_deploy(
|
||||
deps
|
||||
):
|
||||
_maven_util('deploy', deps)
|
||||
def maven_deploy(name, deps):
|
||||
_maven_util(name, 'deploy', deps)
|
||||
|
||||
def maven_install(
|
||||
deps
|
||||
):
|
||||
_maven_util(
|
||||
name = 'install',
|
||||
deps = deps)
|
||||
def maven_install(name, deps):
|
||||
_maven_util(name, 'install', deps)
|
||||
|
||||
def _maven_util(
|
||||
name,
|
||||
deps
|
||||
):
|
||||
def _maven_util(name, action, deps):
|
||||
cmd = [
|
||||
'$(exe //tools:maven_deploy)',
|
||||
'-a', name,
|
||||
'-v', GERRIT_VER,
|
||||
'-a', action,
|
||||
'-v', GERRIT_VERSION,
|
||||
'-d', '"$DEPS"'
|
||||
]
|
||||
genrule(
|
||||
name = 'api_%s' % name,
|
||||
name = name,
|
||||
cmd = ' '.join(cmd),
|
||||
deps = deps + ['//tools:maven_deploy'],
|
||||
out = '__fake.api_%s__' % name
|
||||
out = '__fake.%s__' % name
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user