Merge branch 'stable-2.9'
* stable-2.9: Fix GitWeb link for parent commits Move gerrit.war from api_{install,deploy} to war_{install,deploy} New review UI: Fix display of large avatar image in user popup panel Conflicts: .buckconfig Change-Id: I3ec139fb5b95fc443be834fba8866528e7a51ab2
This commit is contained in:
@@ -1,8 +1,10 @@
|
|||||||
[alias]
|
[alias]
|
||||||
all = //:all
|
all = //:all
|
||||||
api = //:api
|
api = //:api
|
||||||
api_deploy = //tools/maven:deploy
|
api_deploy = //tools/maven:api_deploy
|
||||||
api_install = //tools/maven:install
|
api_install = //tools/maven:api_install
|
||||||
|
war_deploy = //tools/maven:war_deploy
|
||||||
|
war_install = //tools/maven:war_install
|
||||||
chrome = //:chrome
|
chrome = //:chrome
|
||||||
docs = //Documentation:html
|
docs = //Documentation:html
|
||||||
firefox = //:firefox
|
firefox = //:firefox
|
||||||
|
@@ -129,18 +129,30 @@ project directories in `buck-out/gen`, here as example for plugin API:
|
|||||||
buck-out/gen/gerrit-plugin-api/plugin-api-javadoc.jar
|
buck-out/gen/gerrit-plugin-api/plugin-api-javadoc.jar
|
||||||
----
|
----
|
||||||
|
|
||||||
Install {extension,plugin,gwt}-api and gerrit.war to the local maven repository:
|
Install {extension,plugin,gwt}-api to the local maven repository:
|
||||||
|
|
||||||
----
|
----
|
||||||
buck build api_install
|
buck build api_install
|
||||||
----
|
----
|
||||||
|
|
||||||
Deploy {extension,plugin,gwt}-api and gerrit.war to the remote maven repository:
|
Deploy {extension,plugin,gwt}-api to the remote maven repository:
|
||||||
|
|
||||||
----
|
----
|
||||||
buck build api_deploy
|
buck build api_deploy
|
||||||
----
|
----
|
||||||
|
|
||||||
|
Install gerrit.war to the local maven repository:
|
||||||
|
|
||||||
|
----
|
||||||
|
buck build war_install
|
||||||
|
----
|
||||||
|
|
||||||
|
Deploy gerrit.war to the remote maven repository:
|
||||||
|
|
||||||
|
----
|
||||||
|
buck build war_deploy
|
||||||
|
----
|
||||||
|
|
||||||
The type of the repo is induced from the Gerrit version name, i.e.
|
The type of the repo is induced from the Gerrit version name, i.e.
|
||||||
|
|
||||||
* `2.9-SNAPSHOT`: snapshot repo
|
* `2.9-SNAPSHOT`: snapshot repo
|
||||||
|
@@ -156,6 +156,12 @@ configuration needed for deployment]
|
|||||||
|
|
||||||
* The WAR file to upload is `buck-out/gen/release.war`
|
* The WAR file to upload is `buck-out/gen/release.war`
|
||||||
* Upload WAR to the storage bucket via `https://cloud.google.com/console` (manual via web browser)
|
* Upload WAR to the storage bucket via `https://cloud.google.com/console` (manual via web browser)
|
||||||
|
* Push the WAR file to the Maven storage bucket:
|
||||||
|
+
|
||||||
|
----
|
||||||
|
buck build war_deploy
|
||||||
|
----
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[[push-stable]]
|
[[push-stable]]
|
||||||
|
@@ -80,27 +80,33 @@ public class AvatarImage extends Image implements LoadHandler {
|
|||||||
setHeight(info.height() > 0 ? info.height() + "px" : "");
|
setHeight(info.height() > 0 ? info.height() + "px" : "");
|
||||||
setUrl(info.url());
|
setUrl(info.url());
|
||||||
popup(account, addPopup);
|
popup(account, addPopup);
|
||||||
|
} else if (account.email() != null) {
|
||||||
|
loadAvatar(account, size, addPopup);
|
||||||
}
|
}
|
||||||
} else if (account.email() != null) {
|
} else if (account.email() != null) {
|
||||||
// TODO Kill /accounts/*/avatar URL.
|
loadAvatar(account, size, addPopup);
|
||||||
String u = account.email();
|
|
||||||
if (Gerrit.isSignedIn()
|
|
||||||
&& u.equals(Gerrit.getUserAccount().getPreferredEmail())) {
|
|
||||||
u = "self";
|
|
||||||
}
|
|
||||||
RestApi api = new RestApi("/accounts/").id(u).view("avatar");
|
|
||||||
if (size > 0) {
|
|
||||||
api.addParameter("s", size);
|
|
||||||
setSize("", size + "px");
|
|
||||||
}
|
|
||||||
setVisible(false);
|
|
||||||
setUrl(api.url());
|
|
||||||
popup(account, addPopup);
|
|
||||||
} else {
|
} else {
|
||||||
setVisible(false);
|
setVisible(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void loadAvatar(AccountInfo account, int size, boolean addPopup) {
|
||||||
|
// TODO Kill /accounts/*/avatar URL.
|
||||||
|
String u = account.email();
|
||||||
|
if (Gerrit.isSignedIn()
|
||||||
|
&& u.equals(Gerrit.getUserAccount().getPreferredEmail())) {
|
||||||
|
u = "self";
|
||||||
|
}
|
||||||
|
RestApi api = new RestApi("/accounts/").id(u).view("avatar");
|
||||||
|
if (size > 0) {
|
||||||
|
api.addParameter("s", size);
|
||||||
|
setSize("", size + "px");
|
||||||
|
}
|
||||||
|
setVisible(false);
|
||||||
|
setUrl(api.url());
|
||||||
|
popup(account, addPopup);
|
||||||
|
}
|
||||||
|
|
||||||
private void popup(AccountInfo account, boolean addPopup) {
|
private void popup(AccountInfo account, boolean addPopup) {
|
||||||
if (addPopup) {
|
if (addPopup) {
|
||||||
PopupHandler popupHandler = new PopupHandler(account, this);
|
PopupHandler popupHandler = new PopupHandler(account, this);
|
||||||
|
@@ -154,7 +154,7 @@ class CommitBox extends Composite {
|
|||||||
GitwebLink gw = Gerrit.getGitwebLink();
|
GitwebLink gw = Gerrit.getGitwebLink();
|
||||||
if (gw != null) {
|
if (gw != null) {
|
||||||
Anchor a =
|
Anchor a =
|
||||||
new Anchor(gw.toRevision(project, c.commit()), gw.getLinkName());
|
new Anchor(gw.getLinkName(), gw.toRevision(project, c.commit()));
|
||||||
a.setStyleName(style.parentWebLink());
|
a.setStyleName(style.parentWebLink());
|
||||||
parentWebLinks.add(a);
|
parentWebLinks.add(a);
|
||||||
}
|
}
|
||||||
|
@@ -21,27 +21,51 @@ def maven_package(
|
|||||||
doc = {},
|
doc = {},
|
||||||
war = {}):
|
war = {}):
|
||||||
cmd = ['$(exe //tools/maven:mvn)', '-v', version, '-o', '$OUT']
|
cmd = ['$(exe //tools/maven:mvn)', '-v', version, '-o', '$OUT']
|
||||||
dep = []
|
api_cmd = []
|
||||||
|
api_deps = []
|
||||||
for type,d in [('jar', jar), ('java-source', src), ('javadoc', doc), ('war', war)]:
|
for type,d in [('jar', jar), ('java-source', src), ('javadoc', doc)]:
|
||||||
for a,t in d.iteritems():
|
for a,t in d.iteritems():
|
||||||
cmd.append('-s %s:%s:$(location %s)' % (a,type,t))
|
api_cmd.append('-s %s:%s:$(location %s)' % (a,type,t))
|
||||||
dep.append(t)
|
api_deps.append(t)
|
||||||
|
|
||||||
genrule(
|
genrule(
|
||||||
name = 'install',
|
name = 'api_install',
|
||||||
cmd = ' '.join(cmd + ['-a', 'install']),
|
cmd = ' '.join(cmd + api_cmd + ['-a', 'install']),
|
||||||
deps = dep + ['//tools/maven:mvn'],
|
deps = api_deps + ['//tools/maven:mvn'],
|
||||||
out = 'install.info',
|
out = 'api_install.info',
|
||||||
)
|
)
|
||||||
|
|
||||||
if repository and url:
|
if repository and url:
|
||||||
genrule(
|
genrule(
|
||||||
name = 'deploy',
|
name = 'api_deploy',
|
||||||
cmd = ' '.join(cmd + [
|
cmd = ' '.join(cmd + api_cmd + [
|
||||||
'-a', 'deploy',
|
'-a', 'deploy',
|
||||||
'--repository', repository,
|
'--repository', repository,
|
||||||
'--url', url]),
|
'--url', url]),
|
||||||
deps = dep + ['//tools/maven:mvn'],
|
deps = api_deps + ['//tools/maven:mvn'],
|
||||||
out = 'deploy.info',
|
out = 'api_deploy.info',
|
||||||
|
)
|
||||||
|
|
||||||
|
war_cmd = []
|
||||||
|
war_deps = []
|
||||||
|
for a,t in war.iteritems():
|
||||||
|
war_cmd.append('-s %s:war:$(location %s)' % (a,t))
|
||||||
|
war_deps.append(t)
|
||||||
|
|
||||||
|
genrule(
|
||||||
|
name = 'war_install',
|
||||||
|
cmd = ' '.join(cmd + war_cmd + ['-a', 'install']),
|
||||||
|
deps = war_deps + ['//tools/maven:mvn'],
|
||||||
|
out = 'war_install.info',
|
||||||
|
)
|
||||||
|
|
||||||
|
if repository and url:
|
||||||
|
genrule(
|
||||||
|
name = 'war_deploy',
|
||||||
|
cmd = ' '.join(cmd + war_cmd + [
|
||||||
|
'-a', 'deploy',
|
||||||
|
'--repository', repository,
|
||||||
|
'--url', url]),
|
||||||
|
deps = war_deps + ['//tools/maven:mvn'],
|
||||||
|
out = 'war_deploy.info',
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user