Symlinks are transformed as well, which leads into broken symlinks.

Adding the correct transformation scope flags here.

https://www.gnu.org/software/tar/manual/html_section/tar_51.html
mentions a way to fix this:

```
In addition, several transformation scope flags are supported, that control to what files transformations apply. These are:

[...]

`S'
Do not apply transformation to symbolic link targets.
```
This commit is contained in:
Jan Wagner 2020-11-08 19:40:45 +01:00
parent 76fe8d7716
commit 32dba72991

View file

@ -89,7 +89,7 @@ async function main() {
"tar", "tar",
"--exclude-vcs", "--exclude-vcs",
"--exclude", "./debian", "--exclude", "./debian",
"--transform", `s/^\./${package}-${version}/`, "--transform", `s/^\./${package}-${version}/S`,
"-cvzf", `${buildDirectory}/${package}_${version}.orig.tar.gz`, "-cvzf", `${buildDirectory}/${package}_${version}.orig.tar.gz`,
"-C", sourceDirectory, "-C", sourceDirectory,
"./" "./"