Skip to content

Commit

Permalink
v0.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Strum355 committed Feb 12, 2021
1 parent 3dfaed7 commit bbcfe00
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 13 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,36 @@ jobs:
strategy:
matrix:
platforms:
- os: ubuntu-20.04
- os: ubuntu-18.04
target: x86_64-unknown-linux-gnu
dir: server/mcshader-lsp
- os: windows-latest
target: x86_64-windows-msvc
target: x86_64-windows-msvc.exe
dir: server/mcshader-lsp.exe
- os: macos-10.15
target: x86_64-apple-darwin
dir: server/mcshader-lsp
steps:
- uses: actions/checkout@v2
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
default: true
- name: Build server
run: cargo build --release
run: cargo build --release --out-dir . -Z unstable-options
- name: Upload release file
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
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_content_type: application/octet-stream
release-vscode-extension:
runs-on: ubuntu-20.04
needs: empty-release
needs: [release-server, empty-release]
steps:
- uses: actions/checkout@v2
- run: npm i
Expand Down
1 change: 0 additions & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ server/
*.py
.gitignore
**/*.yml
**/*.md
**/*.txt
4 changes: 1 addition & 3 deletions client/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ export class Extension {
const exists = await fs.stat(dest).then(() => true, () => false)
if (!exists) await this.state.updateServerVersion(undefined)

this.state.updateServerVersion('borger')

const release = await getReleaseInfo(this.package.version)

const platform = platforms[`${process.arch} ${process.platform}`]
Expand All @@ -94,7 +92,7 @@ export class Extension {

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(
this.state.serverVersion == undefined ?
Expand Down
5 changes: 3 additions & 2 deletions client/src/lspClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ export class LanguageClient extends lsp.LanguageClient {
constructor(ext: Extension) {
super('vscode-mc-shader', 'VSCode MC Shader', {
command: process.env['MCSHADER_DEBUG'] ?
ext.context.asAbsolutePath(path.join('server', 'target', 'debug', 'mcshader-lsp')) :
path.join(ext.context.globalStoragePath, 'mcshader-lsp')
ext.context.asAbsolutePath(path.join('server', 'target', 'debug', 'mcshader-lsp')) +
(process.platform === 'win32' ? '.exe' : '') :
path.join(ext.context.globalStoragePath, 'mcshader-lsp')
}, {
documentSelector: [{scheme: 'file', language: 'glsl'}],
outputChannel: lspOutputChannel,
Expand Down
3 changes: 2 additions & 1 deletion client/src/persistent_state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ export class PersistentState {
log.info('working with state', { serverVersion })
}

get serverVersion(): string | undefined {
public get serverVersion(): string | undefined {
return this.state.get('serverVersion')
}

async updateServerVersion(value: string | undefined) {
await this.state.update('serverVersion', value)
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-mc-shader",
"displayName": "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",
"author": "Noah Santschi-Cooney (Strum355)",
"license": "MIT",
Expand Down

0 comments on commit bbcfe00

Please sign in to comment.