Skip to content

Commit 495ae2e

Browse files
committed
Squashed 'release-tools/' changes from 1d60e77..7bc70e5
7bc70e5 Merge pull request kubernetes-csi#129 from pohly/squash-documentation e0b02e7 README.md: document usage of --squash 316cb95 Merge pull request kubernetes-csi#132 from yiyang5055/bugfix/boilerplate 26e2ab1 fix: default boilerplate path 1add8c1 Merge pull request kubernetes-csi#133 from pohly/kubernetes-1.20-tag 3e811d6 prow.sh: fix "on-master" prow jobs git-subtree-dir: release-tools git-subtree-split: 7bc70e5
1 parent 7ca2890 commit 495ae2e

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

README.md

+9-2
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,17 @@ is the recommended way of maintaining a copy of the rules inside the
4444
changes also locally, test them and then push them back to the shared
4545
repository at a later time.
4646

47+
We no longer care about importing the full commit history, so `--squash` should be used
48+
when submitting a `release-tools` update. Also make sure that the PR for that
49+
contains the automatically generated commit message in the PR description.
50+
It contains the list of individual commits that were squashed. The script from
51+
https://github.com/kubernetes-csi/csi-release-tools/issues/7 can create such
52+
PRs automatically.
53+
4754
Cheat sheet:
4855

49-
- `git subtree add --prefix=release-tools https://github.com/kubernetes-csi/csi-release-tools.git master` - add release tools to a repo which does not have them yet (only once)
50-
- `git subtree pull --prefix=release-tools https://github.com/kubernetes-csi/csi-release-tools.git master` - update local copy to latest upstream (whenever upstream changes)
56+
- `git subtree add --squash --prefix=release-tools https://github.com/kubernetes-csi/csi-release-tools.git master` - add release tools to a repo which does not have them yet (only once)
57+
- `git subtree pull --squash --prefix=release-tools https://github.com/kubernetes-csi/csi-release-tools.git master` - update local copy to latest upstream (whenever upstream changes)
5158
- edit, `git commit`, `git subtree push --prefix=release-tools [email protected]:<user>/csi-release-tools.git <my-new-or-existing-branch>` - push to a new branch before submitting a PR
5259

5360
verify-shellcheck.sh

boilerplate/boilerplate.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
import argparse
2020
import difflib
2121
import glob
22-
import json
23-
import mmap
2422
import os
2523
import re
2624
import sys
@@ -33,12 +31,12 @@
3331
nargs='*')
3432

3533
# Rootdir defaults to the directory **above** the repo-infra dir.
36-
rootdir = os.path.dirname(__file__) + "./../../../"
34+
rootdir = os.path.dirname(__file__) + "./../../"
3735
rootdir = os.path.abspath(rootdir)
3836
parser.add_argument(
3937
"--rootdir", default=rootdir, help="root directory to examine")
4038

41-
default_boilerplate_dir = os.path.join(rootdir, "csi-driver-nfs/hack/boilerplate")
39+
default_boilerplate_dir = os.path.abspath(os.path.dirname(__file__))
4240

4341
parser.add_argument(
4442
"--boilerplate-dir", default=default_boilerplate_dir)
@@ -199,4 +197,4 @@ def main():
199197
return 0
200198

201199
if __name__ == "__main__":
202-
sys.exit(main())
200+
sys.exit(main())

prow.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ version_to_git () {
7171
version="$1"
7272
shift
7373
case "$version" in
74-
latest) echo "master";;
74+
latest|master) echo "master";;
7575
release-*) echo "$version";;
7676
*) echo "v$version";;
7777
esac

0 commit comments

Comments
 (0)