mirror of
https://github.com/Strum355/mcshader-lsp.git
synced 2025-09-09 18:20:34 +00:00
v0.9.1
This commit is contained in:
parent
3dfaed7371
commit
bbcfe009bb
6 changed files with 20 additions and 13 deletions
18
.github/workflows/release.yml
vendored
18
.github/workflows/release.yml
vendored
|
@ -32,28 +32,36 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
platforms:
|
platforms:
|
||||||
- os: ubuntu-20.04
|
- os: ubuntu-18.04
|
||||||
target: x86_64-unknown-linux-gnu
|
target: x86_64-unknown-linux-gnu
|
||||||
|
dir: server/mcshader-lsp
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
target: x86_64-windows-msvc
|
target: x86_64-windows-msvc.exe
|
||||||
|
dir: server/mcshader-lsp.exe
|
||||||
- os: macos-10.15
|
- os: macos-10.15
|
||||||
target: x86_64-apple-darwin
|
target: x86_64-apple-darwin
|
||||||
|
dir: server/mcshader-lsp
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- name: Install latest nightly
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: nightly
|
||||||
|
default: true
|
||||||
- name: Build server
|
- name: Build server
|
||||||
run: cargo build --release
|
run: cargo build --release --out-dir . -Z unstable-options
|
||||||
- name: Upload release file
|
- name: Upload release file
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ needs.empty-release.outputs.upload_url }}
|
upload_url: ${{ needs.empty-release.outputs.upload_url }}
|
||||||
asset_path: target/release/mcshader-lsp
|
asset_path: ${{ matrix.platforms.dir }}
|
||||||
asset_name: mcshader-lsp-${{ matrix.platforms.target }}
|
asset_name: mcshader-lsp-${{ matrix.platforms.target }}
|
||||||
asset_content_type: application/octet-stream
|
asset_content_type: application/octet-stream
|
||||||
release-vscode-extension:
|
release-vscode-extension:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
needs: empty-release
|
needs: [release-server, empty-release]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- run: npm i
|
- run: npm i
|
||||||
|
|
|
@ -7,5 +7,4 @@ server/
|
||||||
*.py
|
*.py
|
||||||
.gitignore
|
.gitignore
|
||||||
**/*.yml
|
**/*.yml
|
||||||
**/*.md
|
|
||||||
**/*.txt
|
**/*.txt
|
|
@ -82,8 +82,6 @@ export class Extension {
|
||||||
const exists = await fs.stat(dest).then(() => true, () => false)
|
const exists = await fs.stat(dest).then(() => true, () => false)
|
||||||
if (!exists) await this.state.updateServerVersion(undefined)
|
if (!exists) await this.state.updateServerVersion(undefined)
|
||||||
|
|
||||||
this.state.updateServerVersion('borger')
|
|
||||||
|
|
||||||
const release = await getReleaseInfo(this.package.version)
|
const release = await getReleaseInfo(this.package.version)
|
||||||
|
|
||||||
const platform = platforms[`${process.arch} ${process.platform}`]
|
const platform = platforms[`${process.arch} ${process.platform}`]
|
||||||
|
@ -94,7 +92,7 @@ export class Extension {
|
||||||
|
|
||||||
if (release.tag_name === this.state.serverVersion) return
|
if (release.tag_name === this.state.serverVersion) return
|
||||||
|
|
||||||
const artifact = release.assets.find(artifact => artifact.name === `mcshader-lsp-${platform}`)
|
const artifact = release.assets.find(artifact => artifact.name === `mcshader-lsp-${platform}${(process.platform === 'win32' ? '.exe' : '')}`)
|
||||||
|
|
||||||
const userResponse = await vscode.window.showInformationMessage(
|
const userResponse = await vscode.window.showInformationMessage(
|
||||||
this.state.serverVersion == undefined ?
|
this.state.serverVersion == undefined ?
|
||||||
|
|
|
@ -11,8 +11,9 @@ export class LanguageClient extends lsp.LanguageClient {
|
||||||
constructor(ext: Extension) {
|
constructor(ext: Extension) {
|
||||||
super('vscode-mc-shader', 'VSCode MC Shader', {
|
super('vscode-mc-shader', 'VSCode MC Shader', {
|
||||||
command: process.env['MCSHADER_DEBUG'] ?
|
command: process.env['MCSHADER_DEBUG'] ?
|
||||||
ext.context.asAbsolutePath(path.join('server', 'target', 'debug', 'mcshader-lsp')) :
|
ext.context.asAbsolutePath(path.join('server', 'target', 'debug', 'mcshader-lsp')) +
|
||||||
path.join(ext.context.globalStoragePath, 'mcshader-lsp')
|
(process.platform === 'win32' ? '.exe' : '') :
|
||||||
|
path.join(ext.context.globalStoragePath, 'mcshader-lsp')
|
||||||
}, {
|
}, {
|
||||||
documentSelector: [{scheme: 'file', language: 'glsl'}],
|
documentSelector: [{scheme: 'file', language: 'glsl'}],
|
||||||
outputChannel: lspOutputChannel,
|
outputChannel: lspOutputChannel,
|
||||||
|
|
|
@ -7,9 +7,10 @@ export class PersistentState {
|
||||||
log.info('working with state', { serverVersion })
|
log.info('working with state', { serverVersion })
|
||||||
}
|
}
|
||||||
|
|
||||||
get serverVersion(): string | undefined {
|
public get serverVersion(): string | undefined {
|
||||||
return this.state.get('serverVersion')
|
return this.state.get('serverVersion')
|
||||||
}
|
}
|
||||||
|
|
||||||
async updateServerVersion(value: string | undefined) {
|
async updateServerVersion(value: string | undefined) {
|
||||||
await this.state.update('serverVersion', value)
|
await this.state.update('serverVersion', value)
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "vscode-mc-shader",
|
"name": "vscode-mc-shader",
|
||||||
"displayName": "Minecraft GLSL Shaders",
|
"displayName": "Minecraft GLSL Shaders",
|
||||||
"description": "A Visual Studio Code extension for linting/etc Minecraft GLSL Shaders",
|
"description": "A Visual Studio Code extension for linting/etc Minecraft GLSL Shaders",
|
||||||
"version": "0.9.0",
|
"version": "0.9.1",
|
||||||
"publisher": "Strum355",
|
"publisher": "Strum355",
|
||||||
"author": "Noah Santschi-Cooney (Strum355)",
|
"author": "Noah Santschi-Cooney (Strum355)",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue