Skip to content

Commit

Permalink
MMIP ini files don't support quotation marks
Browse files Browse the repository at this point in the history
  • Loading branch information
emptyother committed Jun 11, 2018
1 parent eabb38a commit e4a7ca4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 45 deletions.
14 changes: 2 additions & 12 deletions build.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,22 @@
const ini = require('multi-ini');
const zipdir = require('zip-dir');
const semver = require('semver');
const packagejson = require('./package.json');

let fullverstring = '';
const version = packagejson.version;
const file = './source/Install.ini';
const content = ini.read(file);

if (
content &&
content.Header &&
content.Header.VersionBuild
content.Header.VersionMajor
) {
const head = content.Header;

head.VersionMajor = `${semver(version).major}`;
head.VersionMinor = `${semver(version).minor}`;
head.VersionRelease = `${semver(version).patch}`;
head.VersionBuild = `${Number(head.VersionBuild) + 1}`;

fullverstring = [
head.VersionMajor,
head.VersionMinor,
head.VersionRelease,
head.VersionBuild
head.VersionRelease
].join('.');
ini.write(file, content);
}
zipdir('./source', {
saveTo: `./dist/Lyrics To Instrumental v${fullverstring}.mmip`
Expand Down
20 changes: 1 addition & 19 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
"author": "Tom A. Vibeto <[email protected]> (https://onlyhuman.dk)",
"license": "ISC",
"dependencies": {
"clean-stacktrace": "^1.1.0",
"multi-ini": "^2.0.0",
"semver": "^5.5.0",
"zip-dir": "^1.0.2"
}
}
23 changes: 11 additions & 12 deletions source/Install.ini
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
[Header]
ID="LyricsToInstrumental"
Title="Lyrics To Instrumental"
Description="Toolbar button to set lyrics to instrumental for the currently selected songs"
VersionMajor="1"
VersionMinor="0"
VersionRelease="0"
VersionBuild="1"
Type="script"
ID=LyricsToInstrumental
Title=Lyrics To Instrumental
Description=Toolbar button to set lyrics to instrumental for the currently selected songs
VersionMajor=1
VersionMinor=0
VersionRelease=0
Type=script
[Copy]
Src="LyricsToInstrumental.vbs"
Tgt="{app}\Scripts\Auto\LyricsToInstrumental.vbs"
Src=LyricsToInstrumental.vbs
Tgt={app}\Scripts\Auto\LyricsToInstrumental.vbs
[Execute]
File="{app}\Scripts\Auto\LyricsToInstrumental.vbs"
Function="OnStartup()"
File={app}\Scripts\Auto\LyricsToInstrumental.vbs
Function=OnStartup()

0 comments on commit e4a7ca4

Please sign in to comment.