-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Cleanup build script #1245
Cleanup build script #1245
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1245 +/- ##
==========================================
- Coverage 75.3% 75.28% -0.02%
==========================================
Files 149 149
Lines 10841 10841
==========================================
- Hits 8164 8162 -2
- Misses 2210 2212 +2
Partials 467 467
Continue to review full report at Codecov.
|
6e5d84f
to
3edd956
Compare
3edd956
to
f82ad30
Compare
114eba3
to
8d1500b
Compare
Ah, actually, can you add And update the PR title and description, since it's fixing more things than the MacOS incompatibilities... 😊 |
8d1500b
to
83a5337
Compare
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.
LGTM
It's a shame we can't rely on GNU tools, as find dist -type f | parallel ...
would cleanup and speed up the checksum generation (assuming our CI is multi-core). But maybe we can standardize on GNU tools once we move away from Circle and automate these builds.
You don't need |
Ah, but which variant of
Hhmm true. Would this solve it? find dist -type f -printf '%P\n' | parallel sha256sum > checksums.txt In any case, parallelizing this likely won't matter much as a) this script won't be run frequently, and b) there's not a lot of artifacts to checksum, and it's a quick operation anyway. It would still be good to standardize on a single toolchain, and it should be possible once this is automated. |
both GNU and BSD xargs.
It's just the same. The output won't be mixed, but they will be out of order.
I disagree. We shouldn't rely on any toolchain specific features if we can avoid, instead, sticking to POSIX standard, which will be available in all compliant systems. In our case, they're Linux and Mac (BSD). The thing is that for standard utilities, if you write a script which works on BSD, it will be likely working on GNU system as well, but not vice versa. I invite you to read https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Portable-Shell.html, it's not target POSIX, but it will help you write portable shell script in a better way. |
Build release script assumes GNU toolchains to make it works, thus running the script under Mac OSX fails. There're two problems:
date
command invocation using GNU specific parameters.To fix them:
date
and BSDdate
, also use a specific time format form, instead of relying on--iso-8601
GNU option. This will change the timezone offset format from+00:00
to+0000
.While at it, also add
-trimpath
to allgo build
andgo install
command.