Skip to content

Commit

Permalink
feat: Adding to Webi package repository
Browse files Browse the repository at this point in the history
  • Loading branch information
yasserare committed Dec 14, 2023
1 parent 758b001 commit 3ddcc59
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
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

0 comments on commit 3ddcc59

Please sign in to comment.