fix(lib): add nixlet name as top level directory to all uploaded tar's

This commit is contained in:
technofab 2024-05-08 20:01:27 +02:00
parent 57f66fadd4
commit c060c99d40
2 changed files with 2 additions and 2 deletions

2
flake.lock generated
View file

@ -491,7 +491,7 @@
}, },
"locked": { "locked": {
"lastModified": 1, "lastModified": 1,
"narHash": "sha256-DPYdVXcXcHnC9Js4ff28Pbux/uPE8eBqHGrmBaYMhmg=", "narHash": "sha256-vFEHk+Y+T5RyXkZ3HYJvJ1BBtObtpwuMtNlsWWQWync=",
"path": "lib", "path": "lib",
"type": "path" "type": "path"
}, },

View file

@ -113,7 +113,7 @@ with lib; rec {
echo "> Skipped ${name}@${version} because it already exists in the Package Registry" echo "> Skipped ${name}@${version} because it already exists in the Package Registry"
else else
echo "> Uploading new version ${name}@${version}" echo "> Uploading new version ${name}@${version}"
${pkgs.gnutar}/bin/tar -czf /tmp/${name}.tar.gz --mode='u+rwX' -C ${path} . ${pkgs.gnutar}/bin/tar -czf /tmp/${name}.tar.gz --mode='u+rwX' -C ${path} --transform 's/^\./\/${name}/' .
${pkgs.curl}/bin/curl --header "$AUTH_HEADER" --upload-file "/tmp/${name}.tar.gz" "$URL"; echo; ${pkgs.curl}/bin/curl --header "$AUTH_HEADER" --upload-file "/tmp/${name}.tar.gz" "$URL"; echo;
${pkgs.coreutils}/bin/rm -f /tmp/${nixlet.name}.tar.gz ${pkgs.coreutils}/bin/rm -f /tmp/${nixlet.name}.tar.gz
echo "> Finished ${name}@${version}, see above" echo "> Finished ${name}@${version}, see above"