Skip to content

Commit

Permalink
Fix husky pre-commit hook (TTLApp#1017)
Browse files Browse the repository at this point in the history
* Fix TTLApp#1016: Fixing pre-commit hook

* Running npm run lint-fix
  • Loading branch information
araujoarthur0 authored Oct 11, 2023
1 parent 53978ef commit 8026942
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ get_changed_files()
while read -d $'\0' file
do
echo ${file}
done < <(git diff --staged -z --name-only -- $@)
done < <(git diff --staged -z --name-only -- "$@")
}

readarray -t changed_css < <(get_changed_files 'css/*.css')
Expand Down
1 change: 1 addition & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ First, make sure the `changelog.md` displays the correct new version (`## X.Y.Z
This will trigger the release action which creates a draft for the release notes.

If something goes wrong:

1. Delete tag locally: `git tag --delete stable/v3.0.0`
2. Delete tag on remote: `git push --delete origin stable/v3.0.0`

Expand Down
1 change: 0 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<!--- Begin changes - Do not remove -->


<!--- End changes - Do not remove -->

Who built 3.0.1:
Expand Down
20 changes: 10 additions & 10 deletions js/classes/FlexibleDayCalendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ const { BrowserWindow, dialog } = remote;
* @param {Object.<string, any>} options
* @param {function} successCallback
*/
function showDialog(options, successCallback)
{
options['title'] = options['title'] || 'Time to Leave';
dialog.showMessageBox(BrowserWindow.getFocusedWindow(), options)
.then(successCallback)
.catch(err =>
{
console.log(err);
});
}
function showDialog(options, successCallback)
{
options['title'] = options['title'] || 'Time to Leave';
dialog.showMessageBox(BrowserWindow.getFocusedWindow(), options)
.then(successCallback)
.catch(err =>
{
console.log(err);
});
}
////

class FlexibleDayCalendar extends BaseCalendar
Expand Down
20 changes: 10 additions & 10 deletions js/classes/FlexibleMonthCalendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ const { BrowserWindow, dialog } = remote;
* @param {Object.<string, any>} options
* @param {function} successCallback
*/
function showDialog(options, successCallback)
{
options['title'] = options['title'] || 'Time to Leave';
dialog.showMessageBox(BrowserWindow.getFocusedWindow(), options)
.then(successCallback)
.catch(err =>
{
console.log(err);
});
}
function showDialog(options, successCallback)
{
options['title'] = options['title'] || 'Time to Leave';
dialog.showMessageBox(BrowserWindow.getFocusedWindow(), options)
.then(successCallback)
.catch(err =>
{
console.log(err);
});
}
////

class FlexibleMonthCalendar extends BaseCalendar
Expand Down
2 changes: 1 addition & 1 deletion js/window-aux.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const dialog = (electron || electron.remote).dialog;
function showDialogSync(options)
{
options['title'] = options['title'] || 'Time to Leave';
return dialog.showMessageBox(BrowserWindow.getFocusedWindow(), options)
return dialog.showMessageBox(BrowserWindow.getFocusedWindow(), options);
}

/**
Expand Down
38 changes: 20 additions & 18 deletions scripts/create_windows_installer.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
const createWindowsInstaller = require('electron-winstaller').createWindowsInstaller
const createWindowsInstaller = require('electron-winstaller').createWindowsInstaller;

getInstallerConfig()
.then(createWindowsInstaller)
.catch((error) => {
console.error(error.message || error)
process.exit(1)
})
.then(createWindowsInstaller)
.catch((error) =>
{
console.error(error.message || error);
process.exit(1);
});

function getInstallerConfig () {
console.log('creating windows installer')
function getInstallerConfig()
{
console.log('creating windows installer');

return Promise.resolve({
appDirectory: 'release-builds/Time to Leave-win32-ia32',
outputDirectory: 'packages',
exe: 'Time To Leave.exe',
setupIcon: 'assets/icon-win.ico',
setupExe: 'TimeToLeaveInstaller.exe',
noMsi: true,
loadingGif: 'assets/installer.gif',
iconUrl: 'https://raw.githubusercontent.com/thamara/time-to-leave/main/assets/icon-win.ico',
})
return Promise.resolve({
appDirectory: 'release-builds/Time to Leave-win32-ia32',
outputDirectory: 'packages',
exe: 'Time To Leave.exe',
setupIcon: 'assets/icon-win.ico',
setupExe: 'TimeToLeaveInstaller.exe',
noMsi: true,
loadingGif: 'assets/installer.gif',
iconUrl: 'https://raw.githubusercontent.com/thamara/time-to-leave/main/assets/icon-win.ico',
});
}

0 comments on commit 8026942

Please sign in to comment.