Remove .git files/folders before publishing

This commit is contained in:
Dan Hawkins 2018-12-12 11:14:13 +00:00
commit b73e5fd49f

View file

@ -90,9 +90,14 @@ def recallcomponent(releaseinfo, String softwarerelease) {
}
def stripgithistory() {
echo "Stripping git history out of ${releaserepo}"
dir(releaserepofolder) {
sh """#!/bin/bash
( find . -type d -name ".git" && find . -name ".gitignore" && find . -name ".gitmodules" && find . -iname ".gitattributes") | xargs rm -rvf
pwd
find . -type d -name ".git" | xargs rm -rvf
find . -name ".gitignore" | xargs rm -rvf
find . -name ".gitmodules" | xargs rm -rvf
find . -iname ".gitattributes" | xargs rm -rvf
"""
}
}