Skip to content

Commit

Permalink
update version build number
Browse files Browse the repository at this point in the history
  • Loading branch information
daimor committed Jan 14, 2020
1 parent 50e1a03 commit db87423
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 17 deletions.
37 changes: 24 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,20 @@ jobs:
set -e
/usr/bin/Xvfb :10 -ac >> /tmp/Xvfb.out 2>&1 &
disown -ar
- name: Set an output
id: set-version
if: runner.os == 'Linux'
run: |
set -x
VERSION=$(jq -r '.version' package.json | cut -d- -f1)
echo ::set-output name=changelog::$(cat CHANGELOG.md | sed -n "/## \[${VERSION}\]/,/## /p" | sed '/^$/d;1d;$d')
VERSION+=-beta
git tag -l | cat
VERSION+=$(($(git tag -l "v$VERSION*" 2>/dev/null | tail -1 | cut -d. -f4)+1))
echo ::set-output name=version::$VERSION
echo ::set-output name=name::$(jq -r '.name' package.json)-$VERSION
tmp=$(mktemp)
jq --arg version "$VERSION" '.version = $version' package.json > "$tmp" && mv "$tmp" package.json
- name: Use Node.js
uses: actions/setup-node@master
with:
Expand All @@ -25,36 +39,33 @@ jobs:
- run: npm run test
env:
DISPLAY: :10
- name: Set an output
id: get-version
if: runner.os == 'Linux'
run: |
echo ::set-output name=version::$(jq -r '.version' package.json | cut -d- -f1)-B$(date -u "+%Y%m%d")
echo ::set-output name=name::$(jq -r '.name+"-"+.version' package.json | cut -d- -f1-3)-B$(date -u "+%Y%m%d")
- name: Build package
if: runner.os == 'Linux'
run: |
mkdir dist
./node_modules/.bin/vsce package -o ./dist/${{ steps.get-version.outputs.name }}.vsix
./node_modules/.bin/vsce package -o ./dist/${{ steps.set-version.outputs.name }}.vsix
- name: Create Release
id: create_release
uses: actions/create-release@v1
if: runner.os == 'Linux'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.get-version.outputs.version }}
release_name: v${{ steps.get-version.outputs.version }}
tag_name: v${{ steps.set-version.outputs.version }}
release_name: v${{ steps.set-version.outputs.version }}
body: |
Changes in this release
${{ steps.set-version.outputs.changelog}}
draft: false
prerelease: true
- name: Upload Release Asset
id: upload-release-asset
id: upload-release-asset
uses: actions/[email protected]
if: runner.os == 'Linux'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/${{ steps.get-version.outputs.name }}.vsix
asset_name: ${{ steps.get-version.outputs.name }}.vsix
asset_content_type: application/zip
asset_path: ./dist/${{ steps.set-version.outputs.name }}.vsix
asset_name: ${{ steps.set-version.outputs.name }}.vsix
asset_content_type: application/zip
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "InterSystems ObjectScript language support for Visual Studio Code",
"version": "0.7.14-SNAPSHOT",
"icon": "images/logo.png",
"aiKey": "62520d06-0454-4694-ad43-0ff4bd613c04",
"aiKey": "7047c4a1-fc13-43ea-a485-01a74ff0b2af",
"categories": [
"Programming Languages",
"Other",
Expand Down
10 changes: 7 additions & 3 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export function getXmlUri(uri: vscode.Uri): vscode.Uri {
scheme: OBJECTSCRIPTXML_FILE_SCHEMA,
});
}
let reporter;
let reporter: TelemetryReporter;

export const checkConnection = (clearCookies = false): void => {
const conn = config("conn");
Expand Down Expand Up @@ -125,8 +125,12 @@ export const checkConnection = (clearCookies = false): void => {
}
api
.serverInfo()
.then(async info => {
// panel.text = `${connInfo} - Connected`;
.then(info => {
const hasHS = info.result.content.features.find(el => el.name === "HEALTHSHARE" && el.enabled) !== undefined;
reporter.sendTelemetryEvent("connected", {
serverVersion: info.result.content.version,
healthshare: hasHS ? "yes" : "no",
});
})
.catch(error => {
let message = error.message;
Expand Down

0 comments on commit db87423

Please sign in to comment.