-
Notifications
You must be signed in to change notification settings - Fork 781
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Follows-up 06424ba. This ensures reproducible builds for e.g. minor changes in Rollup or Babel. Also remove the file trigger from `.github/workflows/reproducible.yaml` which otherwise triggers on release commits and release branches, because it seems GitHub interprets release branches/tags as creating all files, and thus matching all files. Exclude 3.0.0-alpha.3 because it still committed package-lock.json, and contained older versions than the working copy I released it with.
- Loading branch information
Showing
6 changed files
with
41 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,25 +17,34 @@ const tempDir = path.join(__dirname, '../temp', 'reproducible-builds'); | |
const SRC_REPO = 'https://github.com/qunitjs/qunit.git'; | ||
|
||
/** | ||
* Known caveats prior to QUnit 2.17.0: | ||
* QUnit 2.17.0 and later are fully reproducible with this script. | ||
* | ||
* - Prior to QUnit 2.14.1, file headers included an uncontrolled "current" timestamp. | ||
* This would have to be ignored or replaced prior to comparison. | ||
* - Prior to QUnit 2.14.1, the build wrote files to "/dist" instead of "/qunit". | ||
* - QUnit 2.15.0 contained some CR (\r) characters in comments from fuzzysort.js, | ||
* which get normalized to LF (\n) by Git and npm, but not in the actual builds | ||
* and in what we publish to the CDN. This was fixed in [email protected] and [email protected]. | ||
* Known caveats: | ||
* | ||
* QUnit 2.17.0 and later are fully reproducible with this script. Notes: | ||
* QUnit 2.14.1 - 2.16.0: | ||
* - File headers included an uncontrolled "current" timestamp. | ||
* This would have to be ignored or replaced prior to comparison. | ||
* - The build wrote files to "/dist" instead of "/qunit". | ||
* | ||
* - [email protected] to 2.21.0 were built and published using npm 8 or npm 9. | ||
* QUnit 2.15.0: | ||
* - Contained some CR (\r) characters in comments from fuzzysort.js, | ||
* which get normalized to LF (\n) by Git and npm, but not in the actual builds | ||
* and in what we publish to the CDN. This was fixed in [email protected] and [email protected]. | ||
* | ||
* QUnit 2.17.0 - 2.21.0: | ||
* - These were built and published using npm 8 or npm 9. | ||
* In npm 10, upstream changed gzip encoding slightly for the npm-pack tarball (.tgz). This | ||
* means a tarball from npm 10+ is not byte-for-byte identical to ones generated by npm 8 or 9. | ||
* After gzip-decompression, however, the tar stream is byte-for-byte identical. | ||
* Either use npm 8 or 9 to verify these, or verify the tarball after gzip decompression. | ||
* | ||
* QUnit 3.0.0-alpha.3: | ||
* - The package-lock.json file was a few commits behind what was actually released, | ||
* thus reproducing it uees a slightly Rollup/Babel version that outputs with slightly | ||
* different code formatting. | ||
*/ | ||
const VERIFY_COUNT = 3; | ||
const VERIFY_COUNT = 5; | ||
const EXCLUDE = ['3.0.0-alpha.3']; | ||
|
||
async function buildRelease (version, cacheDir = null) { | ||
console.log(`... ${version}: checking out the source`); | ||
|
@@ -56,8 +65,7 @@ async function buildRelease (version, cacheDir = null) { | |
QUNIT_BUILD_RELEASE: '1', | ||
PUPPETEER_CACHE_DIR: path.join(cacheDir, 'puppeteer_download') | ||
}; | ||
// Use sync for npm-ci to avoid concurrency bugs with shared cache | ||
cp.execFileSync('npm', ['ci'], { | ||
cp.execFileSync('npm', ['install'], { | ||
env: npmEnv, | ||
cwd: gitDir | ||
}); | ||
|
@@ -110,6 +118,9 @@ const Reproducible = { | |
const data = JSON.parse(await utils.download(cdnIndexUrl)); | ||
|
||
for (const release of data.qunit.all.slice(0, VERIFY_COUNT)) { | ||
if (EXCLUDE.includes(release.version)) { | ||
continue; | ||
} | ||
releases[release.version] = { | ||
cdn: { | ||
js: { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters