zotero-plugin 3.3.2 → 3.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/release.js +10 -4
- package/package.json +1 -1
package/bin/release.js
CHANGED
|
@@ -7662,7 +7662,8 @@
|
|
|
7662
7662
|
if (ContinuousIntegration.pull_request) bail("Not releasing pull requests", 0);
|
|
7663
7663
|
if (ContinuousIntegration.tag) {
|
|
7664
7664
|
if (`v${pkg.version}` !== ContinuousIntegration.tag) bail(`Building tag ${ContinuousIntegration.tag}, but package version is ${pkg.version}`);
|
|
7665
|
-
|
|
7665
|
+
const releaseBranches = ["main", "master"].concat(pkg.xpi.releaseBranches || []);
|
|
7666
|
+
if (ContinuousIntegration.branch && !releaseBranches.includes(ContinuousIntegration.branch)) bail(`Building tag ${ContinuousIntegration.tag}, but branch is ${ContinuousIntegration.branch}`);
|
|
7666
7667
|
}
|
|
7667
7668
|
var tags = /* @__PURE__ */ new Set();
|
|
7668
7669
|
for (let regex = /(?:^|\s)(?:#)([a-zA-Z\d]+)/gm, tag; tag = regex.exec(ContinuousIntegration.commit_message); ) {
|
|
@@ -7748,14 +7749,19 @@ This update may name other issues, but the build just dropped here is for you; i
|
|
|
7748
7749
|
async function update_rdf(releases_tag) {
|
|
7749
7750
|
const release = await getRelease(releases_tag, false);
|
|
7750
7751
|
const assets = (await octokit.repos.listReleaseAssets({ owner, repo, release_id: release.data.id })).data;
|
|
7752
|
+
const updates = {
|
|
7753
|
+
"update.rdf": !pkg.xpi.update || pkg.xpi.update.rdf ? "application/rdf+xml" : "",
|
|
7754
|
+
"updates.json": !pkg.xpi.update || pkg.xpi.update.json ? "application/json" : ""
|
|
7755
|
+
};
|
|
7751
7756
|
for (const asset of assets) {
|
|
7752
|
-
if (asset.name
|
|
7757
|
+
if (asset.name in updates && updates[asset.name]) {
|
|
7753
7758
|
report(`removing ${asset.name} from ${release.data.tag_name}`);
|
|
7754
7759
|
if (!dryRun) await octokit.repos.deleteReleaseAsset({ owner, repo, asset_id: asset.id });
|
|
7755
7760
|
}
|
|
7756
7761
|
}
|
|
7757
|
-
|
|
7758
|
-
|
|
7762
|
+
for (const [pointer, mimetype] of Object.entries(updates)) {
|
|
7763
|
+
if (mimetype) await uploadAsset(release, path2.join(root_default, `gen/${pointer}`), mimetype);
|
|
7764
|
+
}
|
|
7759
7765
|
}
|
|
7760
7766
|
async function main() {
|
|
7761
7767
|
if (process.env.NIGHTLY === "true") return;
|