Skip to content

Commit 62dde57

Browse files
committed
docs: update docs build script
1 parent e9706fb commit 62dde57

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ See [action.yml](./action.yml):
1111
with:
1212
# Skip OS checks that will stop installation attempts preemptively.
1313
# Default: false
14-
skip-os-check: ''
14+
skip-os-check: false
1515

1616
# Version to use. Examples: 2008, 2012, 2014, etc. "latest" can also be used.
1717
# Default: latest
18-
sqlserver-version: ''
18+
sqlserver-version: 'latest'
1919

2020
# Version of native client to install. Only 11 is supported.
2121
native-client-version: ''
@@ -25,11 +25,11 @@ See [action.yml](./action.yml):
2525

2626
# The SA user password to use.
2727
# Default: yourStrong(!)Password
28-
sa-password: ''
28+
sa-password: 'yourStrong(!)Password'
2929

3030
# The database collation to use.
3131
# Default: SQL_Latin1_General_CP1_CI_AS
32-
db-collation: ''
32+
db-collation: 'SQL_Latin1_General_CP1_CI_AS'
3333

3434
# Any custom install arguments you wish to use. These must be in the format of
3535
# "/ARG=VAL".
@@ -38,7 +38,7 @@ See [action.yml](./action.yml):
3838
# Wait for the database to respond successfully to queries before completing the
3939
# action. A maximum of 10 attempts is made.
4040
# Default: true
41-
wait-for-ready: ''
41+
wait-for-ready: true
4242
```
4343
<!-- end usage -->
4444

misc/generate-docs.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ function updateUsage(
9595
// Constrain the width of the description
9696
const width = 80;
9797
let description = (input.description as string)
98-
.trimRight()
98+
.trimEnd()
9999
.replace(/\r\n/g, '\n') // Convert CR to LF
100100
.replace(/ +/g, ' ') // Squash consecutive spaces
101101
.replace(/ \n/g, '\n'); // Squash space followed by newline
@@ -123,15 +123,15 @@ function updateUsage(
123123
}
124124

125125
// Append segment
126-
newReadme.push(` # ${segment}`.trimRight());
126+
newReadme.push(` # ${segment}`.trimEnd());
127127

128128
// Remaining
129129
description = description.substr(segment.length);
130130
}
131131

132132
if (input.default !== undefined) {
133133
// Append blank line if description had paragraphs
134-
if ((input.description as string).trimRight().match(/\n[ ]*\r?\n/)) {
134+
if ((input.description as string).trimEnd().match(/\n[ ]*\r?\n/)) {
135135
newReadme.push(` #`);
136136
}
137137

@@ -140,7 +140,16 @@ function updateUsage(
140140
}
141141

142142
// Input name
143-
newReadme.push(` ${key}: ''`);
143+
let inputValue: string;
144+
switch (input.default) {
145+
case 'true':
146+
case 'false':
147+
inputValue = input.default;
148+
break;
149+
default:
150+
inputValue = `'${input.default ?? ''}'`;
151+
}
152+
newReadme.push(` ${key}: ${inputValue}`);
144153

145154
firstInput = false;
146155
}

0 commit comments

Comments
 (0)