Commit Graph

4 Commits (fa6409c6ebd06eeee0b70ad107a1621533070485)

Author SHA1 Message Date
Qiming Teng 427adb7a8a Fix logic in lsync script
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.
2020-11-05 11:36:11 +08:00
Qiming Teng d80a20ea6a Improve the lsync script
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 ++-

```
2020-10-24 09:31:49 +08:00
Qiming Teng bfb4601a15 Fix issue in lsync script
According to 'git diff --help', the `--exist-code` flag can be used to
ensure that the command returns 0 when no difference is found.
2020-10-16 09:28:46 +08:00
Qiming Teng 71f0a9fc41 Add a util script for localization team
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).
2020-10-06 08:46:41 +08:00