-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update: use a named version folder in NPM tarballs #4094
Conversation
@Daniel15 - I'm now worried that this may break |
Looks good to me! I was going to say that we need to update the installation script, but we were clever and added
However, the Windows build is broken, as it's looking for a yarn/resources/winsetup/YarnSetup.wixproj Lines 44 to 48 in cbcdede
Line 6 in 77328c3
Maybe the easiest solution here would be to rename the directory when building the tarball, then rename it back? Then all the scripts in Yarn itself could keep on using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Windows build is broke
Oh, even better @BYK: GNU tar has a |
Ah, this is very unfortunate. I want this code to work across platforms without issues and looks like GNU An alternative would be to just have a symlink named |
I stand corrected: we need that |
@Daniel15 ready |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. The other alternative would be to rename the dist
dir, then tar
it, then rename it back, but this looks cleaner IMO. It sucks that BSD tar and GNU tar differ here, but oh well, at least we can detect the version. That's a pretty clever approach.
@@ -13,7 +13,7 @@ ensureAvailable lintian | |||
ensureAvailable rpmbuild | |||
|
|||
PACKAGE_TMPDIR=tmp/debian_pkg | |||
VERSION=`dist/bin/yarn --version` | |||
VERSION=`./artifacts/yarn-legacy-* --version` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can probably revert this back, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we can. I'd leave this one though since this script doesn't rely on dist
being there, but the other one does so I'll revert that one before landing.
scripts/update-npm.sh
Outdated
@@ -3,7 +3,7 @@ | |||
|
|||
set -ex | |||
|
|||
version=`./dist/bin/yarn --version` | |||
version=`./artifacts/yarn-legacy-* --version` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This too?
Update: use a named version folder in NPM tarballs (yarnpkg#4094)
Summary
Fixes #3758. Makes the top-level folder in the tar archives have a name like
yarn-vX.Y.Z
instead ofdist
using the--transform
and-s
options intar
(they are different in GNU and BSDtar
).Test plan
Run
yarn build-dist
and thentar -ztvf artifacts/yarn-v1.0.0.tar.gz
. Make sure the output lists all the files underyarn-v1.0.0
directory.