-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bump version to go with changes in RC-898
- Loading branch information
Showing
7 changed files
with
171 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
const fs = require("fs"); | ||
const YAML = require("yaml"); | ||
const { version } = require("../package.json"); | ||
|
||
/** | ||
* @typedef {Object} LobApiPublicYamlInfo | ||
* @property {string} version | ||
*/ | ||
|
||
/** | ||
* @typedef {Object} LobApiPublicYaml | ||
* @property {LobApiPublicYamlInfo} info | ||
*/ | ||
|
||
const updateLobApiPublicYmlVersion = async () => { | ||
try { | ||
const file = await fs.promises.readFile("./lob-api-public.yml", "utf8"); | ||
/** @type LobApiPublicYaml */ | ||
const lobApiPublic = YAML.parse(file); | ||
lobApiPublic.info.version = version; | ||
await fs.promises.writeFile( | ||
"./lob-api-public.yml", | ||
YAML.stringify(lobApiPublic, { | ||
minContentWidth: 0, | ||
lineWidth: 0, | ||
}) | ||
); | ||
console.log(`updated version in lob-api-public.yml to ${version}`); | ||
} catch (err) { | ||
console.error( | ||
`error updating version in lob-api-public.yml to ${version}`, | ||
err | ||
); | ||
} | ||
}; | ||
|
||
updateLobApiPublicYmlVersion(); |