Several fixes

This commit is contained in:
Carlos Rodriguez Hernandez
2019-09-09 15:12:26 +00:00
parent c4f6af22f8
commit ac913e8b60
3 changed files with 4 additions and 8 deletions

View File

@@ -1,9 +1,6 @@
#!/bin/bash
currentBranch="$(git rev-parse --abbrev-ref HEAD)"
originCommit="$(git rev-parse --short "$(git merge-base master "$currentBranch")")"
if git diff --name-only "$originCommit" | grep '/kubeapps/'; then
if git diff --name-only --cached | grep '/kubeapps/'; then
printf '\n\U1F6AB Pull Request cancelled\n\nKubeapps changes detected in this repository.\nPlease, implement them in the kubeapps repository (https://github.com/kubeapps/kubeapps/tree/master/chart/kubeapps).\n'
exit 1
fi

View File

@@ -1,9 +1,6 @@
#!/bin/bash
currentBranch="$(git rev-parse --abbrev-ref HEAD)"
originCommit="$(git rev-parse --short "$(git merge-base master "$currentBranch")")"
if git diff --name-only "$originCommit" | grep '/upstreamed/'; then
if git diff --name-only --cached | grep '/upstreamed/'; then
printf '\n\U1F6AB Pull Request cancelled\n\nChanges detected in the "upstreamed" folder.\nPlease, implement them in the Helm Charts repository (https://github.com/helm/charts).\n'
exit 1
fi

2
githooks/pre-push/helm-lint Normal file → Executable file
View File

@@ -1,5 +1,7 @@
#!/bin/bash
## TODO: Only check folders in the bitnami/ path
currentBranch="$(git rev-parse --abbrev-ref HEAD)"
originCommit="$(git rev-parse --short "$(git merge-base master "$currentBranch")")"
filesToBePushed="$(git diff --name-only "$originCommit")"