Skip to content

Commit

Permalink
Experimental support for macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
dbaumgarten committed Jan 11, 2021
1 parent 5a7e9ee commit 6210fe4
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
yodk
yodk.exe
yodk.exe~
yodk-darwin
lslog
dalog
*.vsix
Expand Down
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ script:
- go build -ldflags "-X github.com/dbaumgarten/yodk/cmd.YodkVersion=${TRAVIS_BRANCH}"
- ./yodk version
- GOOS=windows go build -ldflags "-X github.com/dbaumgarten/yodk/cmd.YodkVersion=${TRAVIS_BRANCH}"
- GOOS=darwin go build -o yodk-darwin -ldflags "-X github.com/dbaumgarten/yodk/cmd.YodkVersion=${TRAVIS_BRANCH}"
- cd vscode-yolol
- npm run vscode:prepublish
- npm test --silent
Expand All @@ -32,13 +33,15 @@ before_deploy:
- cd ..
- zip yodk-win.zip yodk.exe
- zip yodk-linux.zip yodk
- zip yodk-darwin.zip yodk-darwin
- ./build-docs.sh
deploy:
- provider: releases
api-key: $GITHUB_TOKEN
file:
- yodk-win.zip
- yodk-linux.zip
- yodk-darwin.zip
- vscode-yolol.vsix
skip_cleanup: true
edge: true
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ If you want to use this projects code in your own project, you best use go-modul

Also, as starbase has not been released, there is a lot of guesswork involved in the code. The goal is to be 100% compatible to starbase's implementation.

# Supported Operating Systems
Yodk (and therefore also vscode-yolol) supports the following Systems:
- Windows x86/64
- Linux x86/64
- MacOS x86/64 (experimental and barely tested)

# Contributing
Found bugs, suggestions, want to add features? Just [open an issue](https://github.com/dbaumgarten/yodk/issues/new).

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion vscode-yolol/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
"vscode-debugprotocol": "^1.41.0-pre.0"
},
"scripts": {
"vscode:prepublish": "npm run update-vscode && npm run compile && cd .. && go build && GOOS=windows go build && cp yodk* vscode-yolol/bin/",
"vscode:prepublish": "npm run update-vscode && npm run compile && cd .. && go build && GOOS=darwin go build -o yodk-darwin && GOOS=windows go build && cp yodk* vscode-yolol/bin/",
"compile": "tsc -b",
"watch": "tsc -b -w",
"bin": "cd .. && go build && cp yodk* vscode-yolol/bin/ && cd vscode-yolol",
Expand Down
3 changes: 3 additions & 0 deletions vscode-yolol/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ export function getExePath(platform?){
if (platform == "win32") {
executable += ".exe"
}
if (platform == "darwin"){
executable = path.join(".","bin","yodk-darwin")
}
return context.asAbsolutePath(executable);
}

Expand Down
5 changes: 5 additions & 0 deletions vscode-yolol/src/test/unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ describe('Interact with binary', async () => {
assert.equal(path,getContext().asAbsolutePath("./bin/yodk"))
})

it('Find on mac', async () => {
let path = getExePath("darwin")
assert.equal(path,getContext().asAbsolutePath("./bin/yodk-darwin"))
})

it('Find on Windows', async () => {
let path = getExePath("win32")
assert.equal(path,getContext().asAbsolutePath("./bin/yodk.exe"))
Expand Down

0 comments on commit 6210fe4

Please sign in to comment.