Skip to content

Commit 9a5a869

Browse files
committed
fixes, updates and smaller size
1 parent 0b833ed commit 9a5a869

File tree

9 files changed

+2140
-754
lines changed

9 files changed

+2140
-754
lines changed

.github/workflows/main.yml

Lines changed: 48 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
- master
1313
release:
1414
types:
15-
- created
15+
- released
1616
jobs:
1717
build:
1818
timeout-minutes: 10
@@ -21,7 +21,7 @@ jobs:
2121
matrix:
2222
os: [ubuntu-latest, windows-latest, macOS-latest]
2323
steps:
24-
- uses: actions/checkout@master
24+
- uses: actions/checkout@v2
2525
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
2626
- name: Set an output
2727
id: set-version
@@ -35,17 +35,17 @@ jobs:
3535
echo ::set-output name=changelog::$CHANGELOG
3636
git tag -l | cat
3737
[ $GITHUB_EVENT_NAME == 'push' ] && VERSION+=-beta && VERSION+=.$(($(git tag -l "v$VERSION.*" | sort -nt. -k4 2>/dev/null | tail -1 | cut -d. -f4)+1))
38-
[ $GITHUB_EVENT_NAME == 'pull_request' ] && VERSION+=-dev
38+
[ $GITHUB_EVENT_NAME == 'pull_request' ] && VERSION+=-dev.${{ github.event.pull_request.number }}
3939
echo ::set-output name=version::$VERSION
4040
NAME=$(jq -r '.name' package.json)-$VERSION
4141
echo ::set-output name=name::$NAME
4242
tmp=$(mktemp)
4343
jq --arg version "$VERSION" '.version = $version' package.json > "$tmp" && mv "$tmp" package.json
4444
mkdir dist
45-
echo $VERSION > ./dist/.version
46-
echo $NAME > ./dist/.name
45+
echo $VERSION > .version
46+
echo $NAME > .name
4747
- name: Use Node.js
48-
uses: actions/setup-node@master
48+
uses: actions/setup-node@v1
4949
with:
5050
node-version: 12.x
5151
- run: npm install
@@ -60,31 +60,41 @@ jobs:
6060
- name: Build package
6161
if: runner.os == 'Linux'
6262
run: |
63-
./node_modules/.bin/vsce package -o ./dist/package.vsix
64-
- uses: actions/upload-artifact@master
63+
npx vsce package -o ${{ steps.set-version.outputs.name }}.vsix
64+
- uses: actions/upload-artifact@v2
65+
if: runner.os == 'Linux'
66+
with:
67+
name: ${{ steps.set-version.outputs.name }}.vsix
68+
path: ${{ steps.set-version.outputs.name }}.vsix
69+
- uses: actions/upload-artifact@v2
6570
if: runner.os == 'Linux'
6671
with:
67-
name: vsix
68-
path: ./dist/
72+
name: meta
73+
path: |
74+
.name
75+
.version
6976
beta:
7077
if: (github.event_name == 'push')
7178
runs-on: ubuntu-latest
7279
needs: build
7380
steps:
74-
- uses: actions/download-artifact@master
81+
- uses: actions/download-artifact@v2
7582
with:
76-
name: vsix
77-
path: ./dist/
83+
name: meta
84+
path: .
7885
- name: Set an output
7986
id: set-version
8087
if: runner.os == 'Linux'
8188
run: |
8289
set -x
83-
echo ::set-output name=version::`cat ./dist/.version`
84-
echo ::set-output name=name::`cat ./dist/.name`
90+
echo ::set-output name=version::`cat .version`
91+
echo ::set-output name=name::`cat .name`
92+
- uses: actions/download-artifact@v2
93+
with:
94+
name: ${{ steps.set-version.outputs.name }}.vsix
8595
- name: Create Release
8696
id: create_release
87-
uses: actions/create-release@master
97+
uses: actions/create-release@v1
8898
if: runner.os == 'Linux'
8999
env:
90100
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -97,13 +107,13 @@ jobs:
97107
${{ steps.set-version.outputs.changelog }}
98108
- name: Upload Release Asset
99109
id: upload-release-asset
100-
uses: actions/upload-release-asset@master
110+
uses: actions/upload-release-asset@v1
101111
if: runner.os == 'Linux'
102112
env:
103113
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
104114
with:
105115
upload_url: ${{ steps.create_release.outputs.upload_url }}
106-
asset_path: ./dist/package.vsix
116+
asset_path: ${{ steps.set-version.outputs.name }}.vsix
107117
asset_name: ${{ steps.set-version.outputs.name }}.vsix
108118
asset_content_type: application/zip
109119
publish:
@@ -114,20 +124,21 @@ jobs:
114124
- uses: actions/checkout@v2
115125
with:
116126
ref: master
117-
- uses: actions/download-artifact@master
127+
token: ${{ secrets.TOKEN }}
128+
- uses: actions/download-artifact@v2
118129
with:
119-
name: vsix
120-
path: ./dist/
130+
name: meta
131+
path: .
121132
- name: Use Node.js
122-
uses: actions/setup-node@master
133+
uses: actions/setup-node@v1
123134
with:
124135
node-version: 12.x
125136
- name: Prepare build
126137
id: set-version
127138
run: |
128-
VERSION=`cat ./dist/.version`
129-
NEXT_VERSION=`cat ./dist/.version | awk -F. '/[0-9]+\./{$NF++;print}' OFS=.`
130-
echo ::set-output name=name::`cat ./dist/.name`
139+
VERSION=`cat .version`
140+
NEXT_VERSION=`cat .version | awk -F. '/[0-9]+\./{$NF++;print}' OFS=.`
141+
echo ::set-output name=name::`cat .name`
131142
tmp=$(mktemp)
132143
git config --global user.name 'ProjectBot'
133144
git config --global user.email '[email protected]'
@@ -137,21 +148,26 @@ jobs:
137148
jq --arg version "$VERSION" '.version = $version' package.json > "$tmp" && mv "$tmp" package.json
138149
jq '.enableProposedApi = false' package.json > "$tmp" && mv "$tmp" package.json
139150
npm install
140-
npm i -g vsce ovsx
141151
git push
152+
- name: Build package
153+
run: |
154+
npx vsce package -o ${{ steps.set-version.outputs.name }}.vsix
142155
- name: Upload Release Asset
143156
id: upload-release-asset
144-
uses: actions/upload-release-asset@master
157+
uses: actions/upload-release-asset@v1
145158
if: runner.os == 'Linux'
146159
env:
147160
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
148161
with:
149162
upload_url: ${{ github.event.release.upload_url }}
150-
asset_path: ./dist/package.vsix
163+
asset_path: ${{ steps.set-version.outputs.name }}.vsix
151164
asset_name: ${{ steps.set-version.outputs.name }}.vsix
152165
asset_content_type: application/zip
153-
- name: Publish to Marketplaces
166+
- name: Publish to VSCode Marketplace
154167
run: |
155-
vsce publish -p ${{ secrets.VSCE_TOKEN }}
156-
ovsx publish --pat ${{ secrets.OVSX_TOKEN }}
157-
168+
[ -n "${{ secrets.VSCE_TOKEN }}" ] && \
169+
npx vsce publish --packagePath ${{ steps.set-version.outputs.name }}.vsix -p ${{ secrets.VSCE_TOKEN }} || true
170+
- name: Publish to Open VSX Registry
171+
run: |
172+
[ -n "${{ secrets.OVSX_TOKEN }}" ] && \
173+
npx ovsx publish ${{ steps.set-version.outputs.name }}.vsix --pat ${{ secrets.OVSX_TOKEN }} || true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.DS_Store
22
node_modules/
33
out/
4+
dist/
45
*.vsix

.vscode/settings.json

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,20 @@
77
"out": true // set this to false to include "out" folder in search results
88
},
99
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
10-
"typescript.tsc.autoDetect": "off"
10+
"typescript.tsc.autoDetect": "off",
11+
"sqltools.connections": [
12+
{
13+
"namespace": "USER",
14+
"connectionMethod": "Server and Port",
15+
"showSystem": false,
16+
"previewLimit": 50,
17+
"server": "localhost",
18+
"port": 52773,
19+
"askForPassword": false,
20+
"driver": "InterSystems IRIS",
21+
"name": "iris",
22+
"username": "_SYSTEM",
23+
"password": "SYS"
24+
}
25+
]
1126
}

.vscodeignore

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
.github/**
2-
.vscode/**
3-
.vscode-test/**
4-
out/test/**
5-
**/*.ts
6-
**/*.map
7-
.gitignore
8-
**/tsconfig.json
9-
**/tslint.json
10-
**/.eslintrc.json
1+
**
2+
!dist/**/*.js
3+
!icons
4+
!docs
5+
!README.md
6+
!CHANGELOG.md
7+
!LICENSE
8+
!package.json
9+
!ui.schema.json
10+
!connection.schema.json

intersystems-iris-native/package.json

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

0 commit comments

Comments
 (0)