Skip to content

Commit 42988a9

Browse files
Merge pull request #151 from DustinCampbell/merge-dev
Merge dev branch into master
2 parents 5f1e507 + a2471e6 commit 42988a9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+3450
-1337
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
bin
22
node_modules
33
out
4+
.omnisharp
45

56
*.vsix

.travis.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,24 @@ sudo: false
22
language: node_js
33

44
node_js:
5-
- "5.1"
5+
- "5.1"
66

77
os:
88
-osx
99
-linux
1010

1111
install:
12-
- npm install
12+
- npm install
13+
- npm install -g vsce
14+
- vsce package
15+
16+
deploy:
17+
provider: releases
18+
api_key:
19+
secure: T6OzDRQEXpIsIKM2V+X+YgSa1vPDXDdoRBOV39BCDkKv7fDH5rTHs/hVtrwIfLvLVAtJq4kDm6hSVAFLpni1nUHzx2hFCi31CCWPlqhDo31v0CMD6pMccUlCFi2iul3T3EAiT4HmoSEKoCLET8uLIKaYoQ6wc+D11z55kM9DFtv/fGwfxL8FWvbNHYaGc3KNvNOwoMcOc8VpXXGQ1Rtc1IAx62G6qS8V6Yn89sUev/AxT/wcU/wmzNW5UgdAUgnJUFbSumwzfFYFJUdkUSP5iLxjlAJJSNHjHzN5wNX1bIMfSv5DJn1P15ev5OyfjJ+EmjFFmOTJiPlgver/scrZzhrv3kvBYULI8vAAgRWde5CgESGJqv5gEIj3oSICv+2MPmB+Kjr/79AfXrCvORc3an9UASyfgQvamfIoboFLNLZTIe/66oH7UmSJ2rtcaYEKMWHo7qq9cI4yFX6SexwqQehrGPr+QFbjpxFFAhs6aJEFGGgw4i/yheEP6Z7mrKx5wqScVfSLz1iBDmPAkB8pSFhXPk4XpYPjZsCI/wzLERYZ1gBweAKosnMt2anf0Eu1USUo1nXvFmsKTH6lBdBIthVW2va2DCgW+aWQj+j/G670UXT7BoHkcx0GaOzhPc6HeS1ovA9/kX5ZBaslPNAOmGycmGJAuNs2sSvFJf9JZY4=
20+
file_glob: true
21+
file: "*.vsix"
22+
skip_cleanup: true
23+
on:
24+
repo: OmniSharp/omnisharp-vscode
25+
tags: true

.vscodeignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ src/**
55
**/*.map
66

77
.vscode/**
8+
.omnisharp/**
89

910
coreclr-debug/debugAdapters/**
1011
coreclr-debug/bin/**

coreclr-debug/.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ bin
22
obj
33
project.lock.json
44
debugAdapters
5-
install.log
5+
install.log
6+
extension.log
7+
project.json

coreclr-debug/project.json

Lines changed: 0 additions & 33 deletions
This file was deleted.

gulpfile.js

Lines changed: 28 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,31 @@
1-
var gulp = require('gulp');
2-
var decompress = require('gulp-decompress');
3-
var tslint = require("gulp-tslint");
4-
var es = require('event-stream');
5-
var GitHub = require('github-releases');
6-
var tmp = require('tmp');
7-
var vfs = require('vinyl-fs');
8-
var del = require('del');
9-
var fs = require('fs');
10-
var path = require('path');
1+
/*---------------------------------------------------------------------------------------------
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
4+
*--------------------------------------------------------------------------------------------*/
115

12-
tmp.setGracefulCleanup();
6+
'use strict';
137

14-
function downloadOmnisharp(version) {
15-
var result = es.through();
8+
const del = require('del');
9+
const gulp = require('gulp');
10+
const tslint = require('gulp-tslint');
11+
const vsce = require('vsce');
12+
const omnisharpDownload = require('./out/omnisharpDownload');
1613

17-
function onError(err) {
18-
result.emit('error', err);
19-
}
20-
21-
var repo = new GitHub({
22-
repo: 'OmniSharp/omnisharp-roslyn',
23-
token: process.env['GITHUB_TOKEN']
24-
});
25-
26-
repo.getReleases({ tag_name: version }, function (err, releases) {
27-
if (err) { return onError(err); }
28-
if (!releases.length) { return onError(new Error('Release not found')); }
29-
if (!releases[0].assets.length) { return onError(new Error('Assets not found')); }
30-
31-
repo.downloadAsset(releases[0].assets[0], function (err, istream) {
32-
if (err) { return onError(err); }
33-
34-
tmp.file(function (err, tmpPath, fd, cleanupCallback) {
35-
if (err) { return onError(err); }
36-
37-
var ostream = fs.createWriteStream(null, { fd: fd });
38-
ostream.once('error', onError);
39-
istream.once('error', onError);
40-
ostream.once('finish', function () {
41-
vfs.src(tmpPath).pipe(result);
42-
});
43-
istream.pipe(ostream);
44-
});
45-
});
46-
});
47-
48-
return result;
49-
}
50-
51-
gulp.task('omnisharp:clean', function () {
52-
return del('bin');
14+
gulp.task('omnisharp:clean', () => {
15+
return del('.omnisharp');
5316
});
5417

55-
gulp.task('omnisharp:fetch', ['omnisharp:clean'], function () {
56-
return downloadOmnisharp('v1.6.7.9')
57-
.pipe(decompress({strip: 1}))
58-
.pipe(gulp.dest('bin'));
18+
gulp.task('omnisharp:fetch', ['omnisharp:clean'], () => {
19+
return omnisharpDownload.downloadOmnisharp();
5920
});
6021

61-
var allTypeScript = [
22+
const allTypeScript = [
6223
'src/**/*.ts',
6324
'!**/*.d.ts',
6425
'!**/typings**'
6526
];
6627

67-
var lintReporter = function (output, file, options) {
28+
const lintReporter = (output, file, options) => {
6829
//emits: src/helloWorld.c:5:3: warning: implicit declaration of function ‘prinft’
6930
var relativeBase = file.base.substring(file.cwd.length + 1).replace('\\', '/');
7031
output.forEach(function(e) {
@@ -73,48 +34,19 @@ var lintReporter = function (output, file, options) {
7334
});
7435
};
7536

76-
gulp.task('tslint', function () {
37+
gulp.task('tslint', () => {
7738
gulp.src(allTypeScript)
78-
.pipe(tslint({
79-
rulesDirectory: "node_modules/tslint-microsoft-contrib"
80-
}))
81-
.pipe(tslint.report(lintReporter, {
82-
summarizeFailureOutput: false,
83-
emitError: false
84-
}))
85-
});
86-
87-
gulp.task('omnisharp:fixscripts', ['omnisharp:fetch'], function () {
88-
89-
var _fixes = Object.create(null);
90-
_fixes['./bin/omnisharp.cmd'] = '@"%~dp0packages\\dnx-clr-win-x86.1.0.0-beta4\\bin\\dnx.exe" "%~dp0packages\\OmniSharp\\1.0.0\\root" run %*';
91-
_fixes['./bin/omnisharp'] = '#!/bin/bash\n\
92-
SOURCE="${BASH_SOURCE[0]}"\n\
93-
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink\n\
94-
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"\n\
95-
SOURCE="$(readlink "$SOURCE")"\n\
96-
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located\n\
97-
done\n\
98-
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"\n\
99-
export SET DNX_APPBASE="$DIR/packages/OmniSharp/1.0.0/root"\n\
100-
export PATH=/usr/local/bin:/Library/Frameworks/Mono.framework/Commands:$PATH # this is required for the users of the Homebrew Mono package\n\
101-
exec "$DIR/packages/dnx-mono.1.0.0-beta4/bin/dnx" "$DNX_APPBASE" run "$@"\n\
102-
\n';
103-
104-
var promises = Object.keys(_fixes).map(function (key) {
105-
return new Promise(function(resolve, reject) {
106-
fs.writeFile(path.join(__dirname, key), _fixes[key], function (err) {
107-
if (err) {
108-
reject(err);
109-
} else {
110-
resolve();
111-
}
112-
})
113-
});
114-
});
115-
116-
return Promise.all(promises)
39+
.pipe(tslint({
40+
rulesDirectory: "node_modules/tslint-microsoft-contrib"
41+
}))
42+
.pipe(tslint.report(lintReporter, {
43+
summarizeFailureOutput: false,
44+
emitError: false
45+
}))
11746
});
11847

48+
gulp.task('omnisharp', ['omnisharp:fetch']);
11949

120-
gulp.task('omnisharp', ['omnisharp:fixscripts']);
50+
gulp.task('package', () => {
51+
vsce(['', '', 'package']);
52+
});

0 commit comments

Comments
 (0)