Skip to content

Commit

Permalink
v1.4.3 - fixes version correlation issue which was causing AS to brea…
Browse files Browse the repository at this point in the history
…k completely
  • Loading branch information
geoidesic committed Aug 31, 2024
1 parent 7efd510 commit 81d8749
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
2 changes: 1 addition & 1 deletion module.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"title": "Actor Studio",
"description": "Easily create Heroes, Villains and everything in between.",
"version": "1.4.1",
"version": "1.4.3",
"styles": [
"dist/style.css"
],
Expand Down
21 changes: 21 additions & 0 deletions release.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import fs from 'fs';
import { execSync } from 'child_process';

// Run `yarn version --patch` to update the version in package.json
execSync('yarn version --patch', { stdio: 'inherit' });

// Read the updated version from package.json
const packageJson = JSON.parse(fs.readFileSync('package.json', 'utf-8'));
const newVersion = packageJson.version;

// Read module.json
const moduleJsonPath = 'module.json';
const moduleJson = JSON.parse(fs.readFileSync(moduleJsonPath, 'utf-8'));

// Update the version in module.json
moduleJson.version = newVersion;

// Write back the updated module.json
fs.writeFileSync(moduleJsonPath, JSON.stringify(moduleJson, null, 4), 'utf-8');

console.log(`Updated module.json to version ${newVersion}`);
5 changes: 0 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,10 @@ import DonationTrackerGameSettings from '~/src/settings/DonationTrackerGameSetti

Hooks.once("init", (app, html, data) => {


game.system.log = log;
log.level = log.DEBUG;


game.system.log.i(`Starting System ${MODULE_ID}`);


game.system.log.i('Initialising for foundry version:', game.version);
game.system.log.i('Initialising module manifest version:', manifestJson.version);
game.system.log.i('Initialising module package version:', packageJson.version);
Expand All @@ -45,7 +41,6 @@ Hooks.once("init", (app, html, data) => {
CONFIG.debug.hooks = true;
}


game.system.log.d('Debug mode is', game.settings.get(MODULE_ID, 'debug') ? 'enabled' : 'disabled');
game.system.log.d('Debug extended mode is', game.settings.get(MODULE_ID, 'debug.hooks') ? 'enabled' : 'disabled');
game.system.log.d('Log level: ',log.level)
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"sourceMap": true,
"noUnusedLocals": true
},
"include": ["src", "test", "__mocks__"],
"include": ["src", "test", "__mocks__", "release.js"],
"exclude": ["node_modules", "**/*.test.ts", "jest.config.ts"]
}

0 comments on commit 81d8749

Please sign in to comment.