Skip to content

Commit

Permalink
os-agnostic date
Browse files Browse the repository at this point in the history
  • Loading branch information
mmomtchev committed Sep 25, 2024
1 parent 1a00f6f commit 9df9250
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ jobs:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run lint
- run: |
- name: nexe test
run: |
./dist/`node -p \
'({"linux": "igc-xc-score-linux", "darwin": "igc-xc-score-macos", "win32": "igc-xc-score.exe"}[os.platform()])'` \
test/marcourt.igc
Expand Down
3 changes: 2 additions & 1 deletion webpack.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ const exec = require('child_process');

const build_pkg = require('./package.json');
const build_git = exec.execSync('git rev-parse --short HEAD').toString();
const build_date = exec.execSync('date -u +"%Y-%m-%d"').toString();
const now = new Date;
const build_date = `${now.getFullYear()}-${(now.getMonth() + 1).toString().padStart(2, '0')}-${now.getDate().toString().padStart(2, '0')}`;

module.exports = (env, argv) => ({
mode: 'none',
Expand Down

0 comments on commit 9df9250

Please sign in to comment.