Skip to content
This repository was archived by the owner on Feb 25, 2020. It is now read-only.

Conversation

abesto
Copy link
Contributor

@abesto abesto commented May 18, 2019

With this change we read .asfignore from the Git checkout if it
exists. For purposes of verifying that the git repo and the source
archive match, files whose filenames match any filename specified in
.asfignore is ignored. Note that there is currently no support for
either specifying folders in .asfignore, or wildcards. It's a strict,
filename-only match.

Test without .asfignore:

$ python src/main.py  --module zipkin-api --version 0.2.1 --gpg-key 50D90C2C \
    --git-hash bc3cd4af4108f2ff7522d0c2782a6bb856bc05dd --repo release \
    --zipname-template 'apache-{module}{dash_incubating}-{version}-source-release' \
    --github-reponame-template '{module}.git' \
    --github-org abesto
...
[WARN] Git tree at provided revision matches source archive
/tmp/tmpve7uk1ix/git/zipkin-api.git/javadoc is only in the git checkout
/tmp/tmpve7uk1ix/git/zipkin-api.git/package-lock.json is only in the git checkout
/tmp/tmpve7uk1ix/git/zipkin-api.git/package.json is only in the git checkout
/tmp/tmpve7uk1ix/git/zipkin-api.git/pom.xml is only in the git checkout
/tmp/tmpve7uk1ix/git/zipkin-api.git/src is only in the git checkout
/tmp/tmpve7uk1ix/git/zipkin-api.git/validate.test.js is only in the git checkout
The contents of the following files differ: zipkin2-api.yaml

Test with .asfignore committed into a fork:

$ python src/main.py  --module zipkin-api --version 0.2.1 --gpg-key 50D90C2C \
    --git-hash 3fa7beb2a2d6c7ec0f9e3f4965bbc3a19cc82a69 --repo release \
    --zipname-template 'apache-{module}{dash_incubating}-{version}-source-release' \
    --github-reponame-template '{module}.git' \
    --github-org abesto
...
[PASS] Git tree at provided revision matches source archive

.asfignore file used for the test:

javadoc
package-lock.json
package.json
pom.xml
validate.test.js
zipkin2-api.yaml
src

With this change we read `.asfignore` from the Git checkout if it
exists. For purposes of verifying that the git repo and the source
archive match, files whose filenames match any filename specified in
`.asfignore` is ignored. Note that there is currently no support for
either specifying folders in `.asfignore`, or wildcards. It's a strict,
filename-only match.

Test without `.asfignore`:

```
$ python src/main.py  --module zipkin-api --version 0.2.1 --gpg-key 50D90C2C \
    --git-hash bc3cd4af4108f2ff7522d0c2782a6bb856bc05dd --repo release \
    --zipname-template 'apache-{module}{dash_incubating}-{version}-source-release' \
    --github-reponame-template '{module}.git' \
    --github-org abesto
...
[WARN] Git tree at provided revision matches source archive
/tmp/tmpve7uk1ix/git/zipkin-api.git/javadoc is only in the git checkout
/tmp/tmpve7uk1ix/git/zipkin-api.git/package-lock.json is only in the git checkout
/tmp/tmpve7uk1ix/git/zipkin-api.git/package.json is only in the git checkout
/tmp/tmpve7uk1ix/git/zipkin-api.git/pom.xml is only in the git checkout
/tmp/tmpve7uk1ix/git/zipkin-api.git/src is only in the git checkout
/tmp/tmpve7uk1ix/git/zipkin-api.git/validate.test.js is only in the git checkout
The contents of the following files differ: zipkin2-api.yaml
```

Test with `.asfignore` committed into a fork:

```
$ python src/main.py  --module zipkin-api --version 0.2.1 --gpg-key 50D90C2C \
    --git-hash 3fa7beb2a2d6c7ec0f9e3f4965bbc3a19cc82a69 --repo release \
    --zipname-template 'apache-{module}{dash_incubating}-{version}-source-release' \
    --github-reponame-template '{module}.git' \
    --github-org abesto
...
[PASS] Git tree at provided revision matches source archive
```

`.asfignore` file used for the test:

```
javadoc
package-lock.json
package.json
pom.xml
validate.test.js
zipkin2-api.yaml
src
```
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant