aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonan <ronan.lemartret@iot.bzh>2017-01-04 10:02:36 +0100
committerRonan <ronan.lemartret@iot.bzh>2017-01-23 14:59:32 +0100
commitfd5f3db501dd4fcc054ff182c4336c3e073a11d6 (patch)
treeafa908e4d434dd7bfaf8923e907f9000efc724b5
parent5d3c0af5b16aabf66a854d88437e1e27b479e256 (diff)
add local fetch to easily test local modification
* add "make localFetch" command * a local local fetch can't be push, you must clean and do a regular fetch to push upstream * AGL_GITHUB_FETCH,AGL_GITHUB_EDIT is use to specify the AGL source * AGL_GITHUB_BRANCH is use to choose the AGL doc branch * AGL_SRC is use to specify the AGL github user * AGL_GERRIT_BRANCH is use to choose the AGL gerrit doc branch * Usage: - make fetch: fetch the site if necessary - make localFetch: fetch the site if necessary but use local file. So just use "make localFetch" instead on "make fetch" to do a local fetch Signed-off-by: Ronan <ronan.lemartret@iot.bzh>
-rw-r--r--.gitignore1
-rw-r--r--Makefile14
-rw-r--r--conf/AppDefaults.js1
-rw-r--r--site/_tocs/apis_services/fetched_files.yml26
-rw-r--r--site/_tocs/architecture/fetched_files.yml8
-rw-r--r--site/_tocs/devguides/fetched_files.yml2
-rw-r--r--site/_tocs/getting_started/fetched_files.yml10
-rw-r--r--site/_tocs/hardware/fetched_files.yml2
8 files changed, 39 insertions, 25 deletions
diff --git a/.gitignore b/.gitignore
index 634aaef..8f0ac43 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@ conf/_release.yml
site/_data/all-pages.yml
site/_data/tocs
.fetch.ts
+.LocalFetch.ts
diff --git a/Makefile b/Makefile
index c61608e..dea0bdf 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,7 @@ DOCBUILD=../doctools/webdocs/docbuild
VERBOSE=--verbose
FETCHTS=.fetch.ts
+LOCALFETCH=.LocalFetch.ts
all: help
@@ -10,6 +11,7 @@ help:
@echo "Usage:"
@echo "- make clean: clean all generated files"
@echo "- make fetch: fetch the site if necessary"
+ @echo "- make localFetch: fetch the site if necessary but use local file."
@echo "- make build: build the site"
@echo "- make push: push the built site"
@echo "- make serve: serve the site"
@@ -18,15 +20,25 @@ help:
clean:
$(DOCBUILD) $(VERBOSE) --clean
rm -f $(FETCHTS)
+ rm -f $(LOCALFETCH)
+
+$(LOCALFETCH): $(wildcard site/_tocs/*/fetched_files.yml)
+ $(DOCBUILD) $(VERBOSE) --localFetch --fetch --force
+ touch $(FETCHTS)
+ touch $@
$(FETCHTS): $(wildcard site/_tocs/*/fetched_files.yml)
- $(DOCBUILD) $(VERBOSE) --fetch --force
+ $(DOCBUILD) $(VERBOSE) $(LOCAL_FETCHTS) --fetch --force
touch $@
.PHONY: fetch
fetch: $(FETCHTS)
@echo "Fetched files up to date."
+.PHONY: localFetch
+localFetch: $(LOCALFETCH) $(FETCHTS)
+ @echo "Fetched files up to date and copy local file."
+
.PHONY: build
build: $(FETCHTS)
$(DOCBUILD) $(VERBOSE) --build
diff --git a/conf/AppDefaults.js b/conf/AppDefaults.js
index 3c34166..5fbc9a8 100644
--- a/conf/AppDefaults.js
+++ b/conf/AppDefaults.js
@@ -34,6 +34,7 @@ config = {
//GEM_FILE : "Absolute Path to GemFile when not within DOCS_TOOLS directory"
GERRIT_FETCH: "https://gerrit.automotivelinux.org/gerrit/gitweb?p=%repo%.git;a=blob_plain;f=%source%;hb=%commit%",
+ AGL_GERRIT_BRANCH : "master",
LAST: undefined
};
diff --git a/site/_tocs/apis_services/fetched_files.yml b/site/_tocs/apis_services/fetched_files.yml
index a9e3be4..5ebf0fb 100644
--- a/site/_tocs/apis_services/fetched_files.yml
+++ b/site/_tocs/apis_services/fetched_files.yml
@@ -38,7 +38,7 @@
##############################################################################################################
url_fetch : "GERRIT_FETCH"
-git_commit : "master"
+git_commit : "AGL_GERRIT_BRANCH"
repositories:
-
@@ -86,10 +86,10 @@ repositories:
label: Bindings Examples
- source: FAQ.md
-
- url_fetch: GITHUB_FETCH
- url_edit: GITHUB_EDIT
- git_name: automotive-grade-linux/docs-agl
- git_commit: master
+ url_fetch: AGL_GITHUB_FETCH
+ url_edit: AGL_GITHUB_EDIT
+ git_name: "%project_source%/docs-agl"
+ git_commit: "AGL_GITHUB_BRANCH"
src_prefix: docs/app-framework
dst_prefix: af-binder
documents:
@@ -97,10 +97,10 @@ repositories:
destination: resources.md
label: Resources
-
- url_fetch: GITHUB_FETCH
- url_edit: GITHUB_EDIT
- git_name: automotive-grade-linux/docs-agl
- git_commit: master
+ url_fetch: AGL_GITHUB_FETCH
+ url_edit: AGL_GITHUB_EDIT
+ git_name: "%project_source%/docs-agl"
+ git_commit: "AGL_GITHUB_BRANCH"
src_prefix: docs/signaling
dst_prefix: signaling
documents:
@@ -122,10 +122,10 @@ repositories:
- source: signaling/AGL-AppFW-CAN-Signaling-Benchmark.pdf
- source: signaling/AGL-Message-Signaling-Developer-Guidelines.pdf
-
- url_fetch: GITHUB_FETCH
- url_edit: GITHUB_EDIT
- git_name: automotive-grade-linux/docs-agl
- git_commit: master
+ url_fetch: AGL_GITHUB_FETCH
+ url_edit: AGL_GITHUB_EDIT
+ git_name: "%project_source%/docs-agl"
+ git_commit: "AGL_GITHUB_BRANCH"
src_prefix: docs/audio
dst_prefix: audio
documents:
diff --git a/site/_tocs/architecture/fetched_files.yml b/site/_tocs/architecture/fetched_files.yml
index a322627..8ca29b3 100644
--- a/site/_tocs/architecture/fetched_files.yml
+++ b/site/_tocs/architecture/fetched_files.yml
@@ -37,9 +37,9 @@
# ------------------------------------
##############################################################################################################
-url_fetch : "GITHUB_FETCH"
-url_edit : "GITHUB_EDIT"
-git_commit : "master"
+url_fetch : "AGL_GITHUB_FETCH"
+url_edit : "AGL_GITHUB_EDIT"
+git_commit : "AGL_GITHUB_BRANCH"
#git_commit : # default defined in _tocs/xxxx/latest.yml
#dst_prefix : # destination_path = destination_prefix + (document.destination || document.source)
@@ -50,7 +50,7 @@ repositories:
documents:
- source: agl_spec_v1_280515.pdf
-
- git_name : automotive-grade-linux/docs-agl
+ git_name : "%project_source%/docs-agl"
src_prefix : docs/sec-blueprint
dst_prefix: security
documents:
diff --git a/site/_tocs/devguides/fetched_files.yml b/site/_tocs/devguides/fetched_files.yml
index 76e240d..e373840 100644
--- a/site/_tocs/devguides/fetched_files.yml
+++ b/site/_tocs/devguides/fetched_files.yml
@@ -38,7 +38,7 @@
##############################################################################################################
url_fetch : "GERRIT_FETCH"
-git_commit: master
+git_commit: "AGL_GERRIT_BRANCH"
repositories:
-
git_name: AGL/meta-agl
diff --git a/site/_tocs/getting_started/fetched_files.yml b/site/_tocs/getting_started/fetched_files.yml
index d8482f4..29e5bdb 100644
--- a/site/_tocs/getting_started/fetched_files.yml
+++ b/site/_tocs/getting_started/fetched_files.yml
@@ -37,14 +37,14 @@
# ------------------------------------
##############################################################################################################
-url_fetch : "GITHUB_FETCH"
-url_edit : "GITHUB_EDIT"
-git_commit : "master"
+url_fetch : "AGL_GITHUB_FETCH"
+url_edit : "AGL_GITHUB_EDIT"
+git_commit : "AGL_GITHUB_BRANCH"
#dst_prefix : # destination_path = destination_prefix + (document.destination || document.source)
repositories:
-
- git_name : automotive-grade-linux/docs-agl
+ git_name : "%project_source%/docs-agl"
src_prefix : docs/getting-started
documents :
- source: source-code.md
@@ -72,7 +72,7 @@ repositories:
-
url_fetch : GERRIT_FETCH
git_name : staging/HomeScreen
- git_commit : master
+ git_commit : AGL_GERRIT_BRANCH
src_prefix : HomeScreen/docs
dst_prefix : homescreen
documents:
diff --git a/site/_tocs/hardware/fetched_files.yml b/site/_tocs/hardware/fetched_files.yml
index e43191e..62b1c0d 100644
--- a/site/_tocs/hardware/fetched_files.yml
+++ b/site/_tocs/hardware/fetched_files.yml
@@ -38,7 +38,7 @@
##############################################################################################################
url_fetch : "GERRIT_FETCH"
-git_commit : "master"
+git_commit : "AGL_GERRIT_BRANCH"
#dst_prefix : # destination_path = destination_prefix + (document.destination || document.source)
repositories: