Skip to content
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

feat: Adding to Webi package repository #1115

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/webinstaller/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This directory contains manifests for [webinstaller](https://webinstall.dev/), a developer tools installer.

The `make-webinstaller-manifest.js` script creates the output file with the appropriate release version number and its release date.
The `make-webinstaller-manifest.js` script creates the output file with the appropriate release version number and its release date, then add content of the output file into `all-versions-manifest/all-versions-manifest.json` which hosts all the data of every release.

## Manually building the manifest

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"releases": []
}
28 changes: 28 additions & 0 deletions dist/webinstaller/make-webinstaller-manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,34 @@ data = data.replace(/\${version}/g, releaseVersion);
data = data.replace(/\${releaseDate}/g, releaseDate);
fs.writeFileSync(outputFile, data, "utf8");

//Global manifest
const versionSpecific = fs.readFileSync(
path.join(__dirname, "quick-lint-js.json"),
"utf8"
);

const allVersions = fs.readFileSync(
path.join(__dirname, "all-versions-manifest/all-versions-manifest.json"),
"utf8"
);

const versionSpecificData = JSON.parse(versionSpecific);
const allVersionsData = JSON.parse(allVersions);

const concatenatedArray = allVersionsData.releases.concat(
versionSpecificData.releases
);

allVersionsData.releases = concatenatedArray;

const updatedAllVersionsContent = JSON.stringify(allVersionsData, null, 2);

fs.writeFileSync(
"all-versions-manifest/all-versions-manifest.json",
updatedAllVersionsContent,
"utf8"
);

// quick-lint-js finds bugs in JavaScript programs.
// Copyright (C) 2020 Matthew "strager" Glazar
//
Expand Down