Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
p-zielinski committed Oct 17, 2023
1 parent e997b2f commit 9248d4c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 23 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ Good practices:
- Run `npm run manage-project -- --vt={your name}-{pull request number or tag number} --create` - this will create new version project with your tag number.
- Visit url provided at the end of the script run to test changes using preview on readme.io
- If you need to make a change:
- Do changes...
- Run `npm run manage-project -- --vt={your name}-{pull request number or tag number} --update`- this will update your version.
- Test changes using preview on readme.io
- Do changes...
- Run `npm run manage-project -- --vt={your name}-{pull request number or tag number} --update`- this will update your version.
- Test changes using preview on readme.io
- If changes are fine, then:
- Add a note in the changelog.
- `git commit; git push`
Expand Down
36 changes: 16 additions & 20 deletions scripts/manage-project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,26 +168,22 @@ const updateReferenceDocs = async (version) => {
const createNewVersion = async (version) => {
//create fork
try {
const response = await fetch(
`
https://dash.readme.com/api/v1/version`,
{
method: "POST",
headers: {
authorization: "Basic " + btoa(process.env.README_IO_AUTH + ":"),
"content-type": "application/json",
accept: "application/json",
},
body: JSON.stringify({
is_beta: false,
is_stable: false,
is_hidden: true,
is_deprecated: false,
from: mainVersion,
version,
}),
}
);
const response = await fetch(`https://dash.readme.com/api/v1/version`, {
method: "POST",
headers: {
authorization: "Basic " + btoa(process.env.README_IO_AUTH + ":"),
"content-type": "application/json",
accept: "application/json",
},
body: JSON.stringify({
is_beta: false,
is_stable: false,
is_hidden: true,
is_deprecated: false,
from: mainVersion,
version,
}),
});
if (response.status !== 200) {
throw new Error(
`Response status: ${response.status}, maybe this versionTag is already created?`
Expand Down

0 comments on commit 9248d4c

Please sign in to comment.