Skip to content
/ pywemo Public
forked from pywemo/pywemo

Commit

Permalink
Use require for importing fs
Browse files Browse the repository at this point in the history
  • Loading branch information
esev committed May 9, 2023
1 parent 187ec5b commit 1b5dcab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/update_release_notes.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// Replace ${VARIABLES} in the RELEASE_NOTES_TEMPLATE.md file.
// Used by .github/workflows/publish.yml.
import { readFile } from 'node:fs/promises';
const fsp = require('fs').promises;

module.exports = async ({github, context, process}) => {
const fileOpts = { encoding: 'utf8' };
let template = await readFile(process.env.TEMPLATE_FILE, fileOpts);
let template = await fsp.readFile(process.env.TEMPLATE_FILE, fileOpts);
for (const [key, value] of Object.entries(process.env)) {
template = template.replaceAll(`\${${key}}`, value);
}

let hashes = await readFile(process.env.SHA256SUM_TXT, fileOpts);
let hashes = await fsp.readFile(process.env.SHA256SUM_TXT, fileOpts);
hashes = hashes.trim()
template = template.replace('${SHA256SUM}', hashes);

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "pywemo-esev"
version = "0.9.1rc16"
version = "0.9.1rc17"
description = "Lightweight Python module to discover and control WeMo devices"
authors = ["Eric Severance <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 1b5dcab

Please sign in to comment.