Skip to content

Commit

Permalink
fix version file generator
Browse files Browse the repository at this point in the history
  • Loading branch information
jjppof committed Feb 23, 2023
1 parent 8811c61 commit a46b8b4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions scripts/generate_deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ const packagerOptions = {
ignore: '^\/(?!(dist|package\.json|assets|electron|static|index-electron\.html))'
};

packager(packagerOptions);
const promise = packager(packagerOptions);

const version = spawnSync('git log --format="%H" -n 1', {shell: true}).stdout.toString().trim();
const today = new Date(Date.now()).toLocaleString();
spawnSync(`echo ${today} : ${version} > dist/${packagerOptions.name}-${packagerOptions.platform}-${packagerOptions.arch}/gshtml5.version`, {shell: true});
promise.then(() => {
const version = spawnSync('git log --format="%H" -n 1', {shell: true}).stdout.toString().trim();
const today = new Date(Date.now()).toLocaleString();
const path = `${packagerOptions.out}/${packagerOptions.name}-${packagerOptions.platform}-${packagerOptions.arch}/gshtml5.version`;
spawnSync(`echo ${today} : ${version} > ${path}`, {shell: true});
});

0 comments on commit a46b8b4

Please sign in to comment.