Skip to content

Commit a5ce33a

Browse files
committed
Add Github CI and prepare publication
1 parent 38c5660 commit a5ce33a

File tree

8 files changed

+287
-21
lines changed

8 files changed

+287
-21
lines changed

.github/workflows/ci.yaml

+131
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
name: CI
2+
on: [push]
3+
4+
env:
5+
PACKAGE_NAME: dafny-vscode-preview
6+
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: "Prepare: Checkout Repository"
14+
uses: actions/checkout@v2
15+
- name: "Prepare: Use Node.js ${{ matrix.node-version }}"
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: v12.x
19+
- name: "Prepare: Setup sonarqube"
20+
uses: warchant/setup-sonar-scanner@v1
21+
22+
- run: npm install
23+
- run: npm run build
24+
- run: npm run package
25+
# - run: npm test
26+
# env:
27+
# CI: true
28+
29+
- name: "Run sonar-scanner"
30+
env:
31+
# to get access to secrets.SONAR_TOKEN, provide GITHUB_TOKEN
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
run: sonar-scanner
34+
-Dsonar.login=${{ secrets.SONAR_TOKEN }}
35+
36+
- name: "Upload Artifact: VSIX Packages"
37+
uses: actions/upload-artifact@v2
38+
with:
39+
name: package
40+
path: dist/*.vsix
41+
42+
43+
release-github:
44+
needs: build
45+
if: startsWith(github.ref, 'refs/tags/v')
46+
runs-on: ubuntu-latest
47+
steps:
48+
- name: "Prepare: Checkout Repository"
49+
uses: actions/checkout@v2
50+
51+
- name: "Prepare: Get Build Artifact"
52+
uses: actions/download-artifact@v2
53+
with:
54+
name: package
55+
path: dist/
56+
57+
- name: "Prepare: Get the version"
58+
id: get_version
59+
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
60+
61+
62+
- name: "Prepare: Get changelog for current version"
63+
id: get_changelog
64+
run: |
65+
CHANGELOG=$(ed --silent CHANGELOG.md <<< "/## ${VERSION}/+;/## /-p")
66+
# Escape Newlines for set-output, see:
67+
# https://github.community/t5/GitHub-Actions/set-output-Truncates-Multiline-Strings/m-p/38372#M3322
68+
CHANGELOG="${CHANGELOG//'%'/'%25'}"
69+
CHANGELOG="${CHANGELOG//$'\n'/'%0A'}"
70+
CHANGELOG="${CHANGELOG//$'\r'/'%0D'}"
71+
echo "::set-output name=CHANGELOG::$CHANGELOG"
72+
env:
73+
VERSION: ${{ steps.get_version.outputs.VERSION }}
74+
75+
- name: "Check for valid release package"
76+
run: test -e ./dist/${PACKAGE_NAME}-${{ steps.get_version.outputs.VERSION }}.vsix
77+
78+
- name: Create Release
79+
id: create_release
80+
uses: actions/create-release@v1
81+
env:
82+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
83+
with:
84+
tag_name: ${{ github.ref }}
85+
release_name: Release ${{ github.ref }}
86+
draft: false
87+
prerelease: false
88+
body: ${{ steps.get_changelog.outputs.CHANGELOG }}
89+
90+
- name: Upload Release Asset
91+
id: upload-release-asset
92+
uses: actions/upload-release-asset@v1
93+
env:
94+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
95+
with:
96+
upload_url: ${{ steps.create_release.outputs.upload_url }}
97+
asset_path: ./dist/${{ env.PACKAGE_NAME }}-${{ steps.get_version.outputs.VERSION }}.vsix
98+
asset_name: ${{ env.PACKAGE_NAME }}-${{ steps.get_version.outputs.VERSION }}.vsix
99+
asset_content_type: application/zip
100+
101+
release-marketplace:
102+
needs: build
103+
if: startsWith(github.ref, 'refs/tags/v')
104+
runs-on: ubuntu-latest
105+
steps:
106+
- name: "Prepare: Checkout Repository"
107+
uses: actions/checkout@v2
108+
109+
- name: "Prepare: Use Node.js ${{ matrix.node-version }}"
110+
uses: actions/setup-node@v1
111+
with:
112+
node-version: v12.x
113+
114+
- name: "Prepare: Get Build Artifact"
115+
uses: actions/download-artifact@v2
116+
with:
117+
name: package
118+
path: dist/
119+
120+
- name: "Prepare: Get the version"
121+
id: get_version
122+
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
123+
124+
- run: npm install
125+
- run: npm run publish -- -p "${MARKETPLACE_TOKEN}" --packagePath dist/${PACKAGE_NAME}-${VERSION}.vsix
126+
env:
127+
# Note: Marketplace Token according to:
128+
# https://code.visualstudio.com/api/working-with-extensions/publishing-extension#get-a-personal-access-token
129+
# The token is only valid for a limited time - renewal might be required.
130+
MARKETPLACE_TOKEN: ${{ secrets.MARKETPLACE_TOKEN }}
131+
VERSION: ${{ steps.get_version.outputs.VERSION }}

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33
.vscode-test
44
node_modules/
55
package-lock.json
6+
/dist/*
7+
!/dist/.gitkeep

.vscodeignore

+10-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
.vscode/**
1+
**/*.map
2+
.github/**
3+
.gitignore
4+
.gitlab-ci.yml
25
.vscode-test/**
6+
.vscode/**
7+
Dockerfile
8+
dafny/**
9+
dist/**
310
out/test/**
4-
testFiles/**
11+
sonar-project.properties
512
src/**
6-
**/*.map
7-
.gitignore
13+
testFiles/**
814
tsconfig.json
9-
vsc-extension-quickstart.md
10-
dafny

CHANGELOG.md

+132
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# Release Notes
2+
3+
## 1.0.3
4+
* Automatically get changelog to GitHub Release
5+
6+
## 1.0.2
7+
* Clean up Release Information
8+
9+
## 1.0.1
10+
* Test-Release for CI
11+
12+
## 1.0.0
13+
* Use new Language Server Integrated with Dafny
14+
15+
## 0.17.2
16+
* Improve highlighting for current dafny version ([#56](https://github.com/DafnyVSCode/Dafny-VSCode/pull/56))
17+
* Upgrade `https-proxy-agent` and `lodash` to fix security vulnerabilies
18+
19+
## 0.17.1
20+
* Correct Dafny Github repository name ([#49](https://github.com/DafnyVSCode/Dafny-VSCode/issues/49))
21+
* Change typescript target from es6 to es2017
22+
* Upgrade `js-yaml` to 3.13.1 to fix security vunerability
23+
* Upgrade Dafny in tests to 2.3.0
24+
25+
## 0.17.0
26+
* Rename configuration option `monoPath` to `monoExecutable` ([#40](https://github.com/DafnyVSCode/Dafny-VSCode/pull/40))
27+
* Update deprecated API calls ([#39](https://github.com/DafnyVSCode/Dafny-VSCode/pull/39))
28+
* Remove deprecated Flow Graph Visualization
29+
* Update minimal VSCode version to 1.25.1
30+
* Update dependencies
31+
* Extension code clean up
32+
33+
## 0.16.0
34+
* Allow customizing the arguments passed to the verify backend ([#42](https://github.com/DafnyVSCode/Dafny-VSCode/pull/42)).
35+
* Update insecure dependencies
36+
37+
## 0.15.0
38+
* Change extension key from FunctionalCorrectness to correctnessLab.
39+
* Fix tslint errors ([#38](https://github.com/DafnyVSCode/Dafny-VSCode/pull/38)).
40+
41+
## 0.14.3
42+
* Rebranding and small readme fixes.
43+
44+
## 0.14.2
45+
* Add workaround for dafny counterExample bug ([#23](https://github.com/DafnyVSCode/Dafny-VSCode/issues/23)).
46+
47+
## 0.14.1
48+
* Clearify mono installation message on macOS.
49+
* Fix incomplete copyright notice and improve contributors section in readme ([#37](https://github.com/DafnyVSCode/Dafny-VSCode/issues/37)).
50+
51+
## 0.14.0
52+
* Fix installation of Dafny on some constellations on Windows ([#7](https://github.com/DafnyVSCode/Dafny-VSCode/issues/7)).
53+
* Check for a recent mono version on launch.
54+
55+
## 0.13.0
56+
57+
* Fixed the CodeLens references counter (Thanks [@GoryMoon](https://github.com/GoryMoon)!)
58+
* Dependencies were upgraded to prevent several vulnerabilities.
59+
60+
## 0.12.0
61+
* The Dafny base path can now alternatively be set via the environment variable DAFNY_PATH.
62+
* Dependencies were upgraded to prevent several vulnerabilities.
63+
64+
## 0.11.1
65+
Use Dafny releases from Microsoft/dafny. Miscellaneous bug fixes.
66+
67+
## 0.10.10
68+
BugFix: Decrease guard
69+
70+
## 0.10.9
71+
BugFix: Rename method
72+
73+
## 0.10.8
74+
Warning if no workspace is used
75+
Changelog
76+
77+
## 0.10.7
78+
BugFix Ubuntu
79+
80+
## 0.10.2
81+
Added Context Menu Commands
82+
83+
## 0.10.1
84+
Manually show counterexample, flow graph
85+
86+
## 0.10.0
87+
Display counter example for failing proof. Switched to typescript implementation to download dependencies. Lots of bugfixes
88+
89+
## 0.9.0
90+
Switched to Language Server. IntelliSense for classes, compile and execute Dafny program in VSCode. QuickFix for decrease, increase and object may be null.
91+
92+
## 0.8.0
93+
CodeLens showing method references, Go to Definition, version checking for newer Dafny release.
94+
95+
## 0.6.0
96+
DafnyDef allows to get SymbolInformation from DafnyServer, which will allow in the future to implement Refactorings. Go to Definition is already implemented.
97+
98+
## 0.5.5
99+
Fallback to wget, if curl is not found.
100+
101+
## 0.5.4
102+
Automatic validation as you type.
103+
104+
## 0.5.1
105+
Smaller bugfixes.
106+
107+
## 0.5.0
108+
Automatic download and installation task on osx and ubuntu `dafny.installDafny`. Also added uninstaller `dafny.uninstallDafny`.
109+
110+
## 0.4.4
111+
Uninstall task of dafny on windows.
112+
113+
## 0.4.0
114+
Automatic download and installation task on windows.
115+
116+
## 0.2.0
117+
Full refactoring of the plugin. issues/3 from ferry~ fixed.
118+
119+
## 0.1.2
120+
Refactored/tweaked UI code, Added `dafny.restartDafnyServer` ("Restart Dafny Server") command.
121+
122+
## 0.1.0
123+
Added syntax highlighting, tested on Ubuntu and OSX.
124+
125+
## 0.0.3
126+
Getting `mono` from PATH when `monoPath` isn't set.
127+
128+
## 0.0.2
129+
Fixed readme and license, added use animation.
130+
131+
## 0.0.1
132+
Initial release, some half baked features turned off.

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# Dafny for Visual Studio Code
1+
# Dafny for Visual Studio Code (Preview Release)
22

3+
⚠️ Warning: This is a **Preview Release** for extension development purposes. Please us the stable version if you just want to use Dafny.
34

45
This extension adds _Dafny_ support to Visual Studio Code.
56
This VSCode plugin needs the Dafny language server, which is placed in a [separate git repository](https://gitlab.dev.ifs.hsr.ch/dafny-ba/dafny-language-server).

dist/.gitkeep

Whitespace-only changes.

logo.png

143 KB
Loading

package.json

+10-14
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,17 @@
11
{
2-
"name": "dafny-vscode",
3-
"displayName": "Dafny",
4-
"description": "Dafny for Visual Studio Code",
5-
"version": "1.0.1",
2+
"name": "dafny-vscode-preview",
3+
"displayName": "Dafny (Preview)",
4+
"description": "Dafny for Visual Studio Code (Preview Release)",
5+
"version": "1.0.3",
66
"publisher": "correctnessLab",
77
"homepage": "https://github.com/DafnyVSCode/",
88
"repository": {
99
"type": "git",
10-
"url": "https://github.com/DafnyVSCode/Dafny-VSCode.git"
10+
"url": "https://github.com/DafnyVSCode/ide-vscode.git"
1111
},
1212
"bugs": {
13-
"url": "https://github.com/DafnyVSCode/Dafny-VSCode/issues"
13+
"url": "https://github.com/DafnyVSCode/ide-vscode/issues"
1414
},
15-
"badges": [
16-
{
17-
"url": "https://travis-ci.com/DafnyVSCode/Dafny-VSCode.svg?branch=master",
18-
"href": "https://travis-ci.com/DafnyVSCode/Dafny-VSCode",
19-
"description": "Continuous integration (Travis)"
20-
}
21-
],
2215
"qna": false,
2316
"license": "MIT",
2417
"galleryBanner": {
@@ -201,7 +194,10 @@
201194
],
202195
"scripts": {
203196
"vscode:compile-typescript": "tsc -p ./",
197+
"build": "tsc -p ./",
204198
"compile": "tsc -watch -p ./",
199+
"package": "vsce package --out dist/",
200+
"publish": "vsce publish",
205201
"postinstall": "node ./node_modules/vscode/bin/install",
206202
"update-vscode": "node ./node_modules/vscode/bin/install"
207203
},
@@ -211,7 +207,7 @@
211207
"mocha": "^5.2.0",
212208
"tslint": "^5.20.1",
213209
"typescript": "^3.6.4",
214-
"vsce": "^1.69.0",
210+
"vsce": "^1.75.0",
215211
"vscode": "^1.1.36"
216212
},
217213
"dependencies": {

0 commit comments

Comments
 (0)