[opensuse-buildservice] [PATCH] [obs-service-tar_scm] - Exclude SCM files by default
In my own testing of the tar_scm 'exclude' feature, I found that the 'tar' command grabs all of the scm's metadata (.svn, .git, etc.) Tar has the option --exclude-vcs, which excludes these files from the tarball. These seems to make the most sense for the way I think tar_scm is supposed to be used. An alternative (possibly better) way would be to have an option to the source service that allows the user to toggle this option on/off; however I don't currently know of any use cases where it would be useful to have the version control system's metadata in the tarball. @@ -258,7 +258,7 @@ mv "$FILE/$MYSUBDIR" "${FILE}-${VERSION}" || exit 1 -tar cf "$MYOUTDIR/${FILE}-${VERSION}.tar" $EXCLUDES "${FILE}-${VERSION}" || exit 1 +tar cf "$MYOUTDIR/${FILE}-${VERSION}.tar" --exclude-vcs $EXCLUDES "${FILE}-${VERSION}" || exit 1 rm -rf "${FILE}-${VERSION}" "$FILE" exit 0 -- Troy Telford -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
participants (1)
-
Troy Telford