xmoj-script 1.1.43 → 1.1.45

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.
@@ -1,5 +1,5 @@
1
- import { readFileSync, writeFileSync } from "fs";
2
- import { execSync } from "child_process";
1
+ import {readFileSync, writeFileSync} from "fs";
2
+ import {execSync} from "child_process";
3
3
 
4
4
  var GithubToken = process.argv[2];
5
5
  var PRNumber = process.argv[3];
@@ -26,6 +26,13 @@ console.log("Last PR : " + LastPR);
26
26
  console.log("Last description : " + LastDescription);
27
27
  console.log("Last release online: " + LastReleaseVersionOnline);
28
28
  console.log("npm version : " + NpmVersion);
29
+
30
+ if (JSONFileContent.includes('//ci-no-touch')) {
31
+ var updatedContent = JSONFileContent.replace('//ci-no-touch', '');
32
+ writeFileSync(JSONFileName, updatedContent, "utf8");
33
+ console.log('I won\'t touch this. Exiting process.');
34
+ process.exit(0);
35
+ }
29
36
  if (LastJSONVersion != LastJSVersion) {
30
37
  console.error("XMOJ.user.js and Update.json have different patch versions.");
31
38
  process.exit(1);
@@ -37,7 +44,7 @@ var CurrentPR = Number(PRNumber);
37
44
  var CurrentDescription = String(process.argv[4]);
38
45
  if (LastJSVersion != NpmVersion) {
39
46
  console.warn("Assuming you manually ran npm version.");
40
- } else if(!(LastPR == CurrentPR && NpmVersion == LastJSVersion)) {
47
+ } else if (!(LastPR == CurrentPR && NpmVersion == LastJSVersion)) {
41
48
  execSync("npm version patch");
42
49
  }
43
50
 
@@ -56,8 +63,7 @@ if (LastPR == CurrentPR && NpmVersion == LastJSVersion) {
56
63
  JSONObject.UpdateHistory[LastJSVersion].UpdateDate = Date.now();
57
64
  JSONObject.UpdateHistory[LastJSVersion].UpdateContents[0].Description = CurrentDescription;
58
65
  CommitMessage = "Update time and description of " + LastJSVersion;
59
- }
60
- else if (ChangedFileList.indexOf("XMOJ.user.js") == -1) {
66
+ } else if (ChangedFileList.indexOf("XMOJ.user.js") == -1) {
61
67
  console.warn("XMOJ.user.js is not changed, so the version should not be updated.");
62
68
  process.exit(0);
63
69
  } else {
package/Update.json CHANGED
@@ -1287,6 +1287,28 @@
1287
1287
  }
1288
1288
  ],
1289
1289
  "Notes": "No release notes were provided for this release."
1290
+ },
1291
+ "1.1.44": {
1292
+ "UpdateDate": 1707803296933,
1293
+ "Prerelease": true,
1294
+ "UpdateContents": [
1295
+ {
1296
+ "PR": 449,
1297
+ "Description": "regression!"
1298
+ }
1299
+ ],
1300
+ "Notes": "No release notes were provided for this release."
1301
+ },
1302
+ "1.1.45": {
1303
+ "UpdateDate": 1708070431275,
1304
+ "Prerelease": true,
1305
+ "UpdateContents": [
1306
+ {
1307
+ "PR": 454,
1308
+ "Description": "fix #400 + //ci-no-touch"
1309
+ }
1310
+ ],
1311
+ "Notes": "No release notes were provided for this release."
1290
1312
  }
1291
1313
  }
1292
1314
  }