Skip to content

Commit 6408e5a

Browse files
Merge pull request #162 from gjsjohnmurray/prepare-3.2.0
Prepare 3.2.0 release
2 parents 94e248b + 478ee28 commit 6408e5a

38 files changed

+2848
-1754
lines changed

.editorconfig

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,19 @@ root = true
33

44
[*]
55
charset = utf-8
6-
indent_style = space
7-
indent_size = 2
6+
indent_style = tab
7+
indent_size = 4
88
end_of_line = lf
99
insert_final_newline = true
1010
trim_trailing_whitespace = true
1111

1212
[*.md]
1313
max_line_length = 0
1414
trim_trailing_whitespace = false
15+
16+
# This section from the microsoft/vscode repo's .editorconfig
17+
# The indent size used in the `package.json` file cannot be changed
18+
# https://github.com/npm/npm/pull/3180#issuecomment-16336516
19+
[{*.yml,*.yaml,package.json}]
20+
indent_style = space
21+
indent_size = 2

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
vscode.d.ts
2+
vscode.proposed.d.ts

.eslintrc.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"parser": "@typescript-eslint/parser",
3+
"parserOptions": {
4+
"ecmaVersion": 2018,
5+
"sourceType": "module",
6+
"project": "./tsconfig.json"
7+
},
8+
"env": {
9+
"es6": true,
10+
"node": true
11+
},
12+
"extends": [
13+
"eslint:recommended",
14+
"plugin:@typescript-eslint/recommended",
15+
"plugin:@typescript-eslint/eslint-recommended",
16+
"prettier",
17+
"prettier/@typescript-eslint",
18+
"plugin:prettier/recommended"
19+
],
20+
"plugins": [
21+
"@typescript-eslint"
22+
],
23+
"rules": {
24+
"@typescript-eslint/no-explicit-any": 0,
25+
"@typescript-eslint/explicit-function-return-type": 0,
26+
"@typescript-eslint/no-unused-vars": 0
27+
}
28+
}

.github/workflows/main.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,19 @@ jobs:
2626
outputs:
2727
name: ${{ steps.set-version.outputs.name }}
2828
version: ${{ steps.set-version.outputs.version }}
29+
taggedbranch: ${{ steps.find-branch.outputs.taggedbranch }}
2930
steps:
3031
- uses: actions/checkout@v2
3132
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
33+
- name: Find which branch the release tag points at
34+
id: find-branch
35+
if: github.event_name == 'release' && runner.os == 'Windows'
36+
shell: bash
37+
run: |
38+
git fetch --depth=1 origin +refs/heads/*:refs/heads/*
39+
set -x
40+
TAGGEDBRANCH=$(git for-each-ref --points-at=${{github.sha}} --format='%(refname:lstrip=2)' refs/heads/)
41+
echo ::set-output name=taggedbranch::$TAGGEDBRANCH
3242
- name: Set an output
3343
id: set-version
3444
if: runner.os == 'Windows'
@@ -101,9 +111,9 @@ jobs:
101111
asset_name: ${{ needs.build.outputs.name }}.vsix
102112
asset_content_type: application/zip
103113
publish:
104-
if: github.event_name == 'release'
105-
runs-on: windows-latest
106114
needs: build
115+
if: github.event_name == 'release' && needs.build.outputs.taggedbranch == 'master'
116+
runs-on: windows-latest
107117
steps:
108118
- uses: actions/checkout@v2
109119
with:
@@ -117,6 +127,9 @@ jobs:
117127
id: set-version
118128
shell: bash
119129
run: |
130+
# REMOVE BELOW AFTER TESTING
131+
exit 1
132+
# REMOVE ABOVE AFTER TESTING
120133
VERSION=${{ needs.build.outputs.version }}
121134
NEXT_VERSION=`echo $VERSION | awk -F. '/[0-9]+\./{$NF++;print}' OFS=.`
122135
tmp=$(mktemp)

.github/workflows/prerelease.yml

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
name: CI-prerelease
2+
3+
on:
4+
push:
5+
branches:
6+
- prerelease
7+
paths-ignore:
8+
- "docs/**"
9+
- ".vscode/**"
10+
- ".github/**"
11+
- "*.md"
12+
- "**/*.md"
13+
pull_request:
14+
branches:
15+
- prerelease
16+
release:
17+
types:
18+
- released
19+
jobs:
20+
build:
21+
timeout-minutes: 10
22+
runs-on: ${{ matrix.os }}
23+
strategy:
24+
matrix:
25+
os: [ubuntu-latest, windows-latest, macOS-latest]
26+
outputs:
27+
name: ${{ steps.set-version.outputs.name }}
28+
version: ${{ steps.set-version.outputs.version }}
29+
taggedbranch: ${{ steps.find-branch.outputs.taggedbranch }}
30+
steps:
31+
- uses: actions/checkout@v2
32+
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
33+
- name: Find which branch the release tag points at
34+
id: find-branch
35+
if: github.event_name == 'release' && runner.os == 'Windows'
36+
shell: bash
37+
run: |
38+
git fetch --depth=1 origin +refs/heads/*:refs/heads/*
39+
set -x
40+
TAGGEDBRANCH=$(git for-each-ref --points-at=${{github.sha}} --format='%(refname:lstrip=2)' refs/heads/)
41+
echo ::set-output name=taggedbranch::$TAGGEDBRANCH
42+
- name: Set an output
43+
id: set-version
44+
if: runner.os == 'Windows'
45+
shell: bash
46+
run: |
47+
set -x
48+
VERSION=$(jq -r '.version' package.json | cut -d- -f1)
49+
[ $GITHUB_EVENT_NAME == 'release' ] && VERSION=${{ github.event.release.tag_name }} && VERSION=${VERSION/v/}
50+
CHANGELOG=$(cat CHANGELOG.md | sed -n "/## \[${VERSION}\]/,/## /p" | sed '/^$/d;1d;$d')
51+
CHANGELOG="${CHANGELOG//$'\n'/'%0A'}"
52+
echo ::set-output name=changelog::$CHANGELOG
53+
git tag -l | cat
54+
[ $GITHUB_EVENT_NAME == 'push' ] && VERSION+=-beta && VERSION+=.$(($(git tag -l "v$VERSION.*" | sort -nt. -k4 2>/dev/null | tail -1 | cut -d. -f4)+1))
55+
[ $GITHUB_EVENT_NAME == 'pull_request' ] && VERSION+=-dev.${{ github.event.pull_request.number }}
56+
echo ::set-output name=version::$VERSION
57+
NAME=$(jq -r '.name' package.json)-$VERSION
58+
echo ::set-output name=name::$NAME
59+
tmp=$(mktemp)
60+
jq --arg version "$VERSION" '.version = $version' package.json > "$tmp" && mv "$tmp" package.json
61+
mkdir dist
62+
echo $VERSION > .version
63+
echo $NAME > .name
64+
- name: Use Node.js
65+
uses: actions/setup-node@v1
66+
with:
67+
node-version: 14.x
68+
- run: npm install
69+
- run: npm run compile
70+
- name: npm test
71+
uses: GabrielBB/[email protected]
72+
with:
73+
run: npm run test
74+
- name: Build pre-release package
75+
if: runner.os == 'Windows'
76+
run: |
77+
npx vsce package --pre-release -o ${{ steps.set-version.outputs.name }}.vsix --githubBranch prerelease
78+
- uses: actions/upload-artifact@v2
79+
if: (runner.os == 'Windows') && (github.event_name != 'release')
80+
with:
81+
name: ${{ steps.set-version.outputs.name }}.vsix
82+
path: ${{ steps.set-version.outputs.name }}.vsix
83+
beta:
84+
if: (github.event_name == 'push')
85+
runs-on: windows-latest
86+
needs: build
87+
steps:
88+
- uses: actions/download-artifact@v2
89+
with:
90+
name: ${{ needs.build.outputs.name }}.vsix
91+
- name: Create Pre-Release
92+
id: create_release
93+
uses: actions/create-release@v1
94+
if: runner.os == 'Windows'
95+
env:
96+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
97+
with:
98+
tag_name: v${{ needs.build.outputs.version }}
99+
release_name: v${{ needs.build.outputs.version }}
100+
prerelease: ${{ github.event_name != 'release' }}
101+
body: |
102+
Changes in this pre-release
103+
${{ needs.build.outputs.changelog }}
104+
- name: Upload Pre-Release Asset
105+
id: upload-release-asset
106+
uses: actions/upload-release-asset@v1
107+
if: runner.os == 'Windows'
108+
env:
109+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
110+
with:
111+
upload_url: ${{ steps.create_release.outputs.upload_url }}
112+
asset_path: ${{ needs.build.outputs.name }}.vsix
113+
asset_name: ${{ needs.build.outputs.name }}.vsix
114+
asset_content_type: application/zip
115+
publish:
116+
needs: build
117+
if: github.event_name == 'release' && needs.build.outputs.taggedbranch == 'prerelease'
118+
runs-on: windows-latest
119+
steps:
120+
- uses: actions/checkout@v2
121+
with:
122+
ref: prerelease
123+
token: ${{ secrets.TOKEN }}
124+
- name: Use Node.js
125+
uses: actions/setup-node@v1
126+
with:
127+
node-version: 14.x
128+
- name: Prepare pre-release build
129+
id: set-version
130+
shell: bash
131+
run: |
132+
VERSION=${{ needs.build.outputs.version }}
133+
NEXT_VERSION=`echo $VERSION | awk -F. '/[0-9]+\./{$NF++;print}' OFS=.`
134+
tmp=$(mktemp)
135+
git config --global user.name 'ProjectBot'
136+
git config --global user.email '[email protected]'
137+
jq --arg version "${NEXT_VERSION}-SNAPSHOT" '.version = $version' package.json > "$tmp" && mv "$tmp" package.json
138+
git add package.json
139+
git commit -m 'auto bump version after pre-release'
140+
jq --arg version "$VERSION" '.version = $version' package.json > "$tmp" && mv "$tmp" package.json
141+
npm install
142+
jq 'del(.enableProposedApi,.enabledApiProposals)' package.json > "$tmp" && mv "$tmp" package.json
143+
git push
144+
- name: Build pre-release package
145+
run: |
146+
npx vsce package --pre-release -o ${{ needs.build.outputs.name }}.vsix --githubBranch prerelease
147+
- name: Upload Release Asset
148+
id: upload-release-asset
149+
uses: actions/upload-release-asset@v1
150+
if: runner.os == 'Windows'
151+
env:
152+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
153+
with:
154+
upload_url: ${{ github.event.release.upload_url }}
155+
asset_path: ${{ needs.build.outputs.name }}.vsix
156+
asset_name: ${{ needs.build.outputs.name }}.vsix
157+
asset_content_type: application/zip
158+
- name: Publish to VSCode Marketplace
159+
shell: bash
160+
run: |
161+
[ -n "${{ secrets.VSCE_TOKEN }}" ] && \
162+
npx vsce publish --pre-release --packagePath ${{ needs.build.outputs.name }}.vsix -p ${{ secrets.VSCE_TOKEN }} || true

.vscode/extensions.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"recommendations": [
3+
"dbaeumer.vscode-eslint",
4+
"EditorConfig.EditorConfig"
5+
]
6+
}

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"[typescript]": {
3+
"editor.defaultFormatter": "vscode.typescript-language-features",
4+
"editor.formatOnSave": true
5+
},
6+
"typescript.preferences.quoteStyle": "double",
7+
}

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 3.2.0 (03-Oct-2022)
2+
* Implement `intersystems-server-credentials` authentication provider.
3+
* Implement `Migrate Legacy Passwords` command (#146).
4+
15
## 2.0.11 (08-Aug-2022)
26
* Fix hang when user presses Escape on password prompt (#154).
37
* Doublequote username in SQL GRANT statement recommendation (#151).

0 commit comments

Comments
 (0)