generated from IWANABETHATGUY/tower-lsp-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
673 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const {execSync} = require('child_process'); | ||
const arch = process.env.MATRIX_ARCH; | ||
const os = process.env.MATRIX_OS; | ||
const rustTarget = process.env.MATRIX_RUST_TARGET; | ||
|
||
if (arch === 'arm64' && os === 'ubuntu-latest') { | ||
console.log('Using cross to build...'); | ||
execSync('cross build -p jsonui_lsp --verbose --release --target=' + rustTarget, {stdio: 'inherit'}); | ||
} else { | ||
console.log('Using cargo to build...'); | ||
execSync('rustup set auto-self-update disable', {stdio: 'inherit'}); | ||
execSync('rustup target add ' + rustTarget, {stdio: 'inherit'}); | ||
execSync('cargo build -p jsonui_lsp --verbose --release --target=' + rustTarget, {stdio: 'inherit'}); | ||
} |
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,20 @@ | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
const targetDir = process.env.TARGET; | ||
const sourcePaths = [ | ||
'target/' + targetDir + '/release/jsonui_lsp', | ||
'target/' + targetDir + '/release/jsonui_lsp.exe' | ||
]; | ||
const destDir = 'dist'; | ||
|
||
sourcePaths.forEach(sourcePath => { | ||
const destPath = path.join(destDir, path.basename(sourcePath)); | ||
|
||
if (fs.existsSync(sourcePath)) { | ||
fs.renameSync(sourcePath, destPath); | ||
console.log('File', path.basename(sourcePath), 'moved successfully to', destPath); | ||
} else { | ||
console.log('File', path.basename(sourcePath), 'not found at', sourcePath); | ||
} | ||
}); |
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,11 @@ | ||
const commitMessage = process.env.GITHUB_EVENT_HEAD_COMMIT_MESSAGE; | ||
const target = process.env.TARGET; | ||
|
||
const execSync = require('child_process').execSync; | ||
if (commitMessage.includes('-pre')) { | ||
console.log("PreRelease jsonui_lsp " + target) | ||
execSync('npx vsce package --pre-release --target ' + target + ' --no-dependencies', {stdio: 'inherit'}); | ||
} else { | ||
console.log("Release jsonui_lsp " + target) | ||
execSync('npx vsce package --target ' + target + ' --no-dependencies', {stdio: 'inherit'}); | ||
} |
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
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
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
Oops, something went wrong.