The logic in the previous fix for supporting directory comparison was
incorrect. It was using the last commit in the target directory for
history checking. However, some files in the target directory might be
out of sync long before the last commit to the directory.
This PR changes the script to do a history checking on a per-file basis.
This PR improves the lsync script so that it can handle directories
(recursively). For example, you can run the following command to find
the detailed changes that are out of sync:
```
./scripts/lsync content/zh/docs/concepts/_index.md
```
and you can run the following command to identify how many files are
out of sync under a given directory:
```
> ./scripts/lsync content/zh/docs/concepts/
content/en/docs/concepts/architecture/control-plane-node-communication.md | 2 +-
content/en/docs/concepts/architecture/controller.md | 10 ++++++++++
content/en/docs/concepts/cluster-administration/logging.md | 4 ++--
content/en/docs/concepts/cluster-administration/system-metrics.md | 2 +-
content/en/docs/concepts/configuration/pod-priority-preemption.md | 2 +-
content/en/docs/concepts/containers/runtime-class.md | 2 +-
content/en/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins.md | 2 +-
content/en/docs/concepts/extend-kubernetes/operator.md | 2 +-
content/en/docs/concepts/extend-kubernetes/service-catalog.md | 2 +-
content/en/docs/concepts/overview/kubernetes-api.md | 2 +-
content/en/docs/concepts/overview/what-is-kubernetes.md | 3 +--
content/en/docs/concepts/overview/working-with-objects/labels.md | 2 +-
content/en/docs/concepts/scheduling-eviction/kube-scheduler.md | 4 ++--
content/en/docs/concepts/services-networking/dual-stack.md | 2 +-
content/en/docs/concepts/storage/ephemeral-volumes.md | 11 +++++------
content/en/docs/concepts/storage/persistent-volumes.md | 2 +-
content/en/docs/concepts/storage/storage-classes.md | 2 +-
content/en/docs/concepts/storage/volumes.md | 5 ++---
content/en/docs/concepts/workloads/_index.md | 2 +-
content/en/docs/concepts/workloads/controllers/replicaset.md | 4 ++--
content/en/docs/concepts/workloads/pods/_index.md | 4 ++--
content/en/docs/concepts/workloads/pods/pod-lifecycle.md | 3 ++-
```
This PR adds a utility script for localization team to check changes
made to the English (upstream) source since last time the localized
version is updated (synchronized).
When a localization user uses diff_l10n_branches.py,
the directory of content on 'Proposed Solution' is fixed.
Thus, this commit changes the directory name according to the l10n language.
* Add a helper script for localization
The script generates a report of outdated contents in
`content/<l10n-lang>` directory by comparing two l10n
team milestone branches.
* Add description for scripts/diff_l10n_branches.py
This script will query all the changes that happen to a reference document (in English) since the last time a given translation was merged (For instance in French).
This could help all the translation team to keep up with the changes that happened inside the reference document.
* Check for examples changes in all branch commits
Review all the commits in the branch looking for changes inside
content/*/examples and if any are found, trigger testing.
This assumes that the main line branch is named "master"
* Tidy examples testing wrapper
- print diagnostics to standard error
- check for a "Yes" value rather than for absence of "No"
Three optimizations:
- move example testing logic into a bash script to save travis specific
commands;
- use kubernetes release package (about 20MB) instead of git repo (about
800 MB at the moment);
- detect whether a PR contains changes to examples and skip examples
testing if not.
Closes: #13140
* Update Hugo version and apply HTML minification to production builds
* Use full flag names for clarity
* Remove Hugo installation logic out of Travis config and into Makefile
* Add Hugo version checking script
* Fix Netlify config version
* Add new Sass generation system
* Remove resources folder
* Add develop Sass command and sourcemaps
* Add Hugo version shortcode for use in docs
* Add OWNERS file to ./sass folder