Skip to content
This repository has been archived by the owner on Feb 15, 2023. It is now read-only.

Commit

Permalink
swap script contents
Browse files Browse the repository at this point in the history
  • Loading branch information
DerLobi committed May 11, 2021
1 parent fc8a839 commit 7906b31
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions actions/create_scriptable/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'Convert Impfdashboard data'
description: 'Downloads TSV formatted data, extracts relevant data and converts it to JSON.'
description: 'Converts the .js file to a .scriptable file'
runs:
using: 'node12'
main: '../../src/index.js'
main: '../../src/createScriptable.js'
4 changes: 2 additions & 2 deletions actions/generate_data/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'Convert Impfdashboard data'
description: 'Converts the .js file to a .scriptable file'
description: 'Downloads TSV formatted data, extracts relevant data and converts it to JSON.'
runs:
using: 'node12'
main: '../../src/createScriptable.js'
main: '../../src/index.js'
6 changes: 3 additions & 3 deletions src/createScriptable.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ const fs = require('fs');
const core = require('@actions/core');

try {
const scriptable = JSON.parse(fs.readFileSync('../../scriptable/Impfdashboard.scriptable', 'utf8'));
const scriptable = JSON.parse(fs.readFileSync('./scriptable/Impfdashboard.scriptable', 'utf8'));

const originalScript = fs.readFileSync('../../scriptable/Impfdashboard.js', 'utf8');
const originalScript = fs.readFileSync('./scriptable/Impfdashboard.js', 'utf8');
let output = originalScript.split('\n');

for (let i = 0; i < 3; i += 1) {
Expand All @@ -15,7 +15,7 @@ try {

scriptable.script = output;

fs.writeFileSync('../../scriptable/Impfdashboard.scriptable', JSON.stringify(scriptable));
fs.writeFileSync('./scriptable/Impfdashboard.scriptable', JSON.stringify(scriptable));
} catch (err) {
core.setFailed(err.message);
}

0 comments on commit 7906b31

Please sign in to comment.