summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2015-10-06 13:13:14 +0300
committerHenri Sara <hesara@vaadin.com>2015-10-06 13:01:33 +0000
commite70ae32bfe051f16b109dfe1303a29a4858c3c07 (patch)
tree0efddd462691daa2ba900a0795283b4650daa74c
parent1d3fc17f38e8dbf3ee2328be221202e1774bd56b (diff)
downloadvaadin-framework-e70ae32bfe051f16b109dfe1303a29a4858c3c07.tar.gz
vaadin-framework-e70ae32bfe051f16b109dfe1303a29a4858c3c07.zip
Add sampler to BuildDemos, support specifying branch for demo
New way to add a built demo with specified branch uses a tuple with the format ("URL", "branch"). The given branch will be used when cloning the demo. Default branch is master and is used if no branch is provided. Change-Id: Ia3d648e9203296cecde8fd1e6d86613ac31a33d5
-rw-r--r--scripts/BuildDemos.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/scripts/BuildDemos.py b/scripts/BuildDemos.py
index 451715f3c5..eef88db78f 100644
--- a/scripts/BuildDemos.py
+++ b/scripts/BuildDemos.py
@@ -19,11 +19,13 @@ demos = {
"dashboard" : "https://github.com/vaadin/dashboard-demo.git",
"parking" : "https://github.com/vaadin/parking-demo.git",
"addressbook" : "https://github.com/vaadin/addressbook.git",
- "grid-gwt" : "https://github.com/vaadin/grid-gwt.git"
+ "grid-gwt" : "https://github.com/vaadin/grid-gwt.git",
+ "sampler" : "demos/sampler"
+# "my-demo" : ("my_demo_url_or_path", "my-demo-dev-branch")
}
-def checkout(folder, url):
- Repo.clone_from(url, join(resultPath, folder))
+def checkout(folder, url, repoBranch = "master"):
+ Repo.clone_from(url, join(resultPath, folder), branch = repoBranch)
if __name__ == "__main__":
# Do imports.
@@ -66,7 +68,11 @@ if __name__ == "__main__":
for demo in demos:
print("Validating demo %s" % (demo))
try:
- checkout(demo, demos[demo])
+ repo = demos[demo]
+ if (isinstance(repo, tuple)):
+ checkout(demo, repo[0], repo[1])
+ else:
+ checkout(demo, repo)
if hasattr(args, "repo") and args.repo is not None:
updateRepositories(join(resultPath, demo), args.repo)
mavenValidate(demo, logFile=getLogFile(demo))