Skip to content

Commit 6267e71

Browse files
author
Christopher-Marcel Böddecker
committed
fix(templates): tarball to zip via bestzip
This works around the fact that Windows Azure Pipelines agents don't come with the zip command.
1 parent 8807b40 commit 6267e71

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

templates/steps/cd.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ steps:
8787
"@semantic-release/npm": "^5.2.0-beta.5",
8888
"@semantic-release/git": "^7.1.0-beta.2",
8989
"@semantic-release/exec": "^3.4.0-beta.2",
90-
"@semantic-release/github": "^5.3.0-beta.6"
90+
"@semantic-release/github": "^5.3.0-beta.6",
91+
"bestzip": "^2.1.2"
9192
}
9293
}
9394
EOF
@@ -158,7 +159,9 @@ steps:
158159
cat > npm-tarball-to-zip.sh <<- "EOF"
159160
cd package
160161
tarball=$(npm list --depth 0 | sed "s/@/-/g; s/ .*/.tgz/g; 1q;")
161-
tar -tf $tarball | sed "s/^package\\///" | zip -@r $(echo $tarball | sed -e "s/\.[^.]*$//").zip
162+
zipName=$(echo $tarball | sed -e "s/\.[^.]*$//").zip
163+
files=$(tar -tf $tarball | sed "s/^package\\///")
164+
npx --no-install --cache ../node_modules bestzip $zipName $files
162165
rm $tarball
163166
EOF
164167
displayName: Create npm-tarball-to-zip.sh

0 commit comments

Comments
 (0)