Skip to content

Commit 6ef0747

Browse files
committed
update version build number
1 parent 50e1a03 commit 6ef0747

File tree

3 files changed

+28
-17
lines changed

3 files changed

+28
-17
lines changed

.github/workflows/main.yml

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,18 @@ jobs:
1616
set -e
1717
/usr/bin/Xvfb :10 -ac >> /tmp/Xvfb.out 2>&1 &
1818
disown -ar
19+
- name: Set an output
20+
id: set-version
21+
if: runner.os == 'Linux'
22+
run: |
23+
VERSION=$(jq -r '.version' package.json | cut -d- -f1)
24+
echo ::set-output name=changelog::$(cat CHANGELOG.md | sed -n "/## \[${VERSION}\]/,/## /p" | sed '/^$/d;1d;$d')
25+
BUILD=$(($(git tag -l "v$VERSION-beta.*" 2>/dev/null | tail -1 | rev | cut -d. -f1)+1))
26+
VERSION+=-B$(date -u "+%Y%m%d").$BUILD
27+
echo ::set-output name=version::$VERSION
28+
echo ::set-output name=name::$(jq -r '.name' package.json)-$VERSION
29+
tmp=$(mktemp)
30+
jq --arg version "$VERSION" '.version = $version' package.json > "$tmp" && mv "$tmp" package.json
1931
- name: Use Node.js
2032
uses: actions/setup-node@master
2133
with:
@@ -25,36 +37,31 @@ jobs:
2537
- run: npm run test
2638
env:
2739
DISPLAY: :10
28-
- name: Set an output
29-
id: get-version
30-
if: runner.os == 'Linux'
31-
run: |
32-
echo ::set-output name=version::$(jq -r '.version' package.json | cut -d- -f1)-B$(date -u "+%Y%m%d")
33-
echo ::set-output name=name::$(jq -r '.name+"-"+.version' package.json | cut -d- -f1-3)-B$(date -u "+%Y%m%d")
3440
- name: Build package
3541
if: runner.os == 'Linux'
3642
run: |
3743
mkdir dist
38-
./node_modules/.bin/vsce package -o ./dist/${{ steps.get-version.outputs.name }}.vsix
44+
./node_modules/.bin/vsce package -o ./dist/${{ steps.set-version.outputs.name }}.vsix
3945
- name: Create Release
4046
id: create_release
4147
uses: actions/create-release@v1
4248
if: runner.os == 'Linux'
4349
env:
4450
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4551
with:
46-
tag_name: v${{ steps.get-version.outputs.version }}
47-
release_name: v${{ steps.get-version.outputs.version }}
52+
tag_name: v${{ steps.set-version.outputs.version }}
53+
release_name: v${{ steps.set-version.outputs.version }}
54+
body: v${{ steps.set-version.outputs.changelog}}
4855
draft: false
4956
prerelease: true
5057
- name: Upload Release Asset
51-
id: upload-release-asset
58+
id: upload-release-asset
5259
uses: actions/upload-release-asset@v1.0.1
5360
if: runner.os == 'Linux'
5461
env:
5562
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5663
with:
5764
upload_url: ${{ steps.create_release.outputs.upload_url }}
58-
asset_path: ./dist/${{ steps.get-version.outputs.name }}.vsix
59-
asset_name: ${{ steps.get-version.outputs.name }}.vsix
60-
asset_content_type: application/zip
65+
asset_path: ./dist/${{ steps.set-version.outputs.name }}.vsix
66+
asset_name: ${{ steps.set-version.outputs.name }}.vsix
67+
asset_content_type: application/zip

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "InterSystems ObjectScript language support for Visual Studio Code",
55
"version": "0.7.14-SNAPSHOT",
66
"icon": "images/logo.png",
7-
"aiKey": "62520d06-0454-4694-ad43-0ff4bd613c04",
7+
"aiKey": "7047c4a1-fc13-43ea-a485-01a74ff0b2af",
88
"categories": [
99
"Programming Languages",
1010
"Other",

src/extension.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export function getXmlUri(uri: vscode.Uri): vscode.Uri {
9797
scheme: OBJECTSCRIPTXML_FILE_SCHEMA,
9898
});
9999
}
100-
let reporter;
100+
let reporter: TelemetryReporter;
101101

102102
export const checkConnection = (clearCookies = false): void => {
103103
const conn = config("conn");
@@ -125,8 +125,12 @@ export const checkConnection = (clearCookies = false): void => {
125125
}
126126
api
127127
.serverInfo()
128-
.then(async info => {
129-
// panel.text = `${connInfo} - Connected`;
128+
.then(info => {
129+
const hasHS = info.result.content.features.find(el => el.name === "HEALTHSHARE" && el.enabled) !== undefined;
130+
reporter.sendTelemetryEvent("connected", {
131+
serverVersion: info.result.content.version,
132+
healthshare: hasHS ? "yes" : "no",
133+
});
130134
})
131135
.catch(error => {
132136
let message = error.message;

0 commit comments

Comments
 (0)