diff mbox series

scripts/make-release: More .git removal

Message ID 458bba0e0865443a3d4e0f8e0dbb5bc712e098b9.1513636434.git.crobinso@redhat.com
State New
Headers show
Series scripts/make-release: More .git removal | expand

Commit Message

Cole Robinson Dec. 18, 2017, 10:33 p.m. UTC
As was last done in 379e21c25, we want to remove .git files for
submodules here, which we aren't presently doing for capstone and
keycodemapdb.

Rather than a whitelist use 'find' to future proof this

Signed-off-by: Cole Robinson <crobinso@redhat.com>
---
 scripts/make-release | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Huth Dec. 19, 2017, 7:52 a.m. UTC | #1
On 18.12.2017 23:33, Cole Robinson wrote:
> As was last done in 379e21c25, we want to remove .git files for
> submodules here, which we aren't presently doing for capstone and
> keycodemapdb.
> 
> Rather than a whitelist use 'find' to future proof this
> 
> Signed-off-by: Cole Robinson <crobinso@redhat.com>
> ---
>  scripts/make-release | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/make-release b/scripts/make-release
> index 3917df7142..7c7bec577f 100755
> --- a/scripts/make-release
> +++ b/scripts/make-release
> @@ -19,7 +19,7 @@ pushd ${destination}
>  git checkout "v${version}"
>  git submodule update --init
>  (cd roms/seabios && git describe --tags --long --dirty > .version)
> -rm -rf .git roms/*/.git dtc/.git pixman/.git
> +find . -depth -name .git -exec rm -rf '{}' \;

Good idea! That also fixes the dead pixman/.git entry :-)

Reviewed-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé Dec. 19, 2017, 10:59 a.m. UTC | #2
On Mon, Dec 18, 2017 at 05:33:54PM -0500, Cole Robinson wrote:
> As was last done in 379e21c25, we want to remove .git files for
> submodules here, which we aren't presently doing for capstone and
> keycodemapdb.
> 
> Rather than a whitelist use 'find' to future proof this
> 
> Signed-off-by: Cole Robinson <crobinso@redhat.com>
> ---
>  scripts/make-release | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Daniel P. Berrange <berrange@redhat.com>


> 
> diff --git a/scripts/make-release b/scripts/make-release
> index 3917df7142..7c7bec577f 100755
> --- a/scripts/make-release
> +++ b/scripts/make-release
> @@ -19,7 +19,7 @@ pushd ${destination}
>  git checkout "v${version}"
>  git submodule update --init
>  (cd roms/seabios && git describe --tags --long --dirty > .version)
> -rm -rf .git roms/*/.git dtc/.git pixman/.git
> +find . -depth -name .git -exec rm -rf '{}' \;
>  # FIXME: The following line is a workaround for avoiding filename collisions
>  # when unpacking u-boot sources on case-insensitive filesystems. Once we
>  # update to something with u-boot commit 610eec7f0 we can drop this line.
> -- 
> 2.14.3
> 
> 

Regards,
Daniel
Markus Armbruster Dec. 19, 2017, 1:13 p.m. UTC | #3
Cole Robinson <crobinso@redhat.com> writes:

> As was last done in 379e21c25, we want to remove .git files for
> submodules here, which we aren't presently doing for capstone and
> keycodemapdb.
>
> Rather than a whitelist use 'find' to future proof this
>
> Signed-off-by: Cole Robinson <crobinso@redhat.com>
> ---
>  scripts/make-release | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/make-release b/scripts/make-release
> index 3917df7142..7c7bec577f 100755
> --- a/scripts/make-release
> +++ b/scripts/make-release
> @@ -19,7 +19,7 @@ pushd ${destination}
>  git checkout "v${version}"
>  git submodule update --init
>  (cd roms/seabios && git describe --tags --long --dirty > .version)
> -rm -rf .git roms/*/.git dtc/.git pixman/.git
> +find . -depth -name .git -exec rm -rf '{}' \;
>  # FIXME: The following line is a workaround for avoiding filename collisions
>  # when unpacking u-boot sources on case-insensitive filesystems. Once we
>  # update to something with u-boot commit 610eec7f0 we can drop this line.

Less scary: run tar with --exclude=.git.
Cole Robinson Jan. 6, 2018, 9:56 p.m. UTC | #4
On 12/19/2017 08:13 AM, Markus Armbruster wrote:
> Cole Robinson <crobinso@redhat.com> writes:
> 
>> As was last done in 379e21c25, we want to remove .git files for
>> submodules here, which we aren't presently doing for capstone and
>> keycodemapdb.
>>
>> Rather than a whitelist use 'find' to future proof this
>>
>> Signed-off-by: Cole Robinson <crobinso@redhat.com>
>> ---
>>  scripts/make-release | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/scripts/make-release b/scripts/make-release
>> index 3917df7142..7c7bec577f 100755
>> --- a/scripts/make-release
>> +++ b/scripts/make-release
>> @@ -19,7 +19,7 @@ pushd ${destination}
>>  git checkout "v${version}"
>>  git submodule update --init
>>  (cd roms/seabios && git describe --tags --long --dirty > .version)
>> -rm -rf .git roms/*/.git dtc/.git pixman/.git
>> +find . -depth -name .git -exec rm -rf '{}' \;
>>  # FIXME: The following line is a workaround for avoiding filename collisions
>>  # when unpacking u-boot sources on case-insensitive filesystems. Once we
>>  # update to something with u-boot commit 610eec7f0 we can drop this line.
> 
> Less scary: run tar with --exclude=.git.
> 

Good idea, I sent a v2 using that instead

Thanks,
Cole
diff mbox series

Patch

diff --git a/scripts/make-release b/scripts/make-release
index 3917df7142..7c7bec577f 100755
--- a/scripts/make-release
+++ b/scripts/make-release
@@ -19,7 +19,7 @@  pushd ${destination}
 git checkout "v${version}"
 git submodule update --init
 (cd roms/seabios && git describe --tags --long --dirty > .version)
-rm -rf .git roms/*/.git dtc/.git pixman/.git
+find . -depth -name .git -exec rm -rf '{}' \;
 # FIXME: The following line is a workaround for avoiding filename collisions
 # when unpacking u-boot sources on case-insensitive filesystems. Once we
 # update to something with u-boot commit 610eec7f0 we can drop this line.