Skip to content

Commit ff8c320

Browse files
committed
Set version to 0.0.0 if using GitHub workflow file
1 parent e785f6b commit ff8c320

File tree

17 files changed

+58
-57
lines changed

17 files changed

+58
-57
lines changed

generators/app/templates/ext-colortheme/github/workflows/publish.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@ jobs:
1616
tag=${GITHUB_REF#refs/tags/}
1717
echo "Setting package version $tag"
1818
npm --no-git-tag-version version "$tag"
19-
npm install -g vsce
20-
vsce package
19+
npx vsce package
2120
- name: Publish extension to marketplace
2221
env:
2322
AZURE_TOKEN: ${{ secrets.AZURE_TOKEN }}
2423
run: |
25-
vsce publish -p "$AZURE_TOKEN"
24+
npx vsce publish -p "$AZURE_TOKEN"

generators/app/templates/ext-colortheme/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": <%- JSON.stringify(name) %>,
33
"displayName": <%- JSON.stringify(displayName) %>,
44
"description": <%- JSON.stringify(description) %>,
5-
"version": "0.0.1",
5+
"version": "<% if (gitHubWorkFlowInit) { %>0.0.0<% } else { %>0.0.1<% } %>",
66
"engines": {
77
"vscode": <%- JSON.stringify(vsCodeEngine) %>
88
},
@@ -18,4 +18,4 @@
1818
}
1919
]
2020
}
21-
}
21+
}

generators/app/templates/ext-command-js/github/workflows/test-publish.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,9 @@ jobs:
4343
tag=${GITHUB_REF#refs/tags/}
4444
echo "Setting package version $tag"
4545
npm --no-git-tag-version version "$tag"
46-
npm install -g vsce
47-
vsce package
46+
npx vsce package
4847
- name: Publish extension to marketplace
4948
env:
5049
AZURE_TOKEN: ${{ secrets.AZURE_TOKEN }}
5150
run: |
52-
vsce publish -p "$AZURE_TOKEN"
51+
npx vsce publish -p "$AZURE_TOKEN"

generators/app/templates/ext-command-js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": <%- JSON.stringify(name) %>,
33
"displayName": <%- JSON.stringify(displayName) %>,
44
"description": <%- JSON.stringify(description) %>,
5-
"version": "0.0.1",
5+
"version": "<% if (gitHubWorkFlowInit) { %>0.0.0<% } else { %>0.0.1<% } %>",
66
"engines": {
77
"vscode": <%- JSON.stringify(vsCodeEngine) %>
88
},

generators/app/templates/ext-command-ts/github/workflows/test-publish.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,9 @@ jobs:
4343
tag=${GITHUB_REF#refs/tags/}
4444
echo "Setting package version $tag"
4545
npm --no-git-tag-version version "$tag"
46-
npm install -g vsce
47-
vsce package
46+
npx vsce package
4847
- name: Publish extension to marketplace
4948
env:
5049
AZURE_TOKEN: ${{ secrets.AZURE_TOKEN }}
5150
run: |
52-
vsce publish -p "$AZURE_TOKEN"
51+
npx vsce publish -p "$AZURE_TOKEN"

generators/app/templates/ext-command-ts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": <%- JSON.stringify(name) %>,
33
"displayName": <%- JSON.stringify(displayName) %>,
44
"description": <%- JSON.stringify(description) %>,
5-
"version": "0.0.1",
5+
"version": "<% if (gitHubWorkFlowInit) { %>0.0.0<% } else { %>0.0.1<% } %>",
66
"engines": {
77
"vscode": <%- JSON.stringify(vsCodeEngine) %>
88
},

generators/app/templates/ext-extensionpack/github/workflows/publish.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@ jobs:
1616
tag=${GITHUB_REF#refs/tags/}
1717
echo "Setting package version $tag"
1818
npm --no-git-tag-version version "$tag"
19-
npm install -g vsce
20-
vsce package
19+
npx vsce package
2120
- name: Publish extension to marketplace
2221
env:
2322
AZURE_TOKEN: ${{ secrets.AZURE_TOKEN }}
2423
run: |
25-
vsce publish -p "$AZURE_TOKEN"
24+
npx vsce publish -p "$AZURE_TOKEN"

generators/app/templates/ext-extensionpack/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": <%- JSON.stringify(name) %>,
33
"displayName": <%- JSON.stringify(displayName) %>,
44
"description": <%- JSON.stringify(description) %>,
5-
"version": "0.0.1",
5+
"version": "<% if (gitHubWorkFlowInit) { %>0.0.0<% } else { %>0.0.1<% } %>",
66
"engines": {
77
"vscode": <%- JSON.stringify(vsCodeEngine) %>
88
},
@@ -13,4 +13,4 @@
1313
"<%- extensionList[i] %>", <%}%>
1414
"<%- extensionList[extensionList.length-1]%>"
1515
]
16-
}
16+
}

generators/app/templates/ext-keymap/github/workflows/publish.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@ jobs:
1616
tag=${GITHUB_REF#refs/tags/}
1717
echo "Setting package version $tag"
1818
npm --no-git-tag-version version "$tag"
19-
npm install -g vsce
20-
vsce package
19+
npx vsce package
2120
- name: Publish extension to marketplace
2221
env:
2322
AZURE_TOKEN: ${{ secrets.AZURE_TOKEN }}
2423
run: |
25-
vsce publish -p "$AZURE_TOKEN"
24+
npx vsce publish -p "$AZURE_TOKEN"

generators/app/templates/ext-keymap/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": <%- JSON.stringify(name) %>,
33
"displayName": <%- JSON.stringify(displayName) %>,
44
"description": <%- JSON.stringify(description) %>,
5-
"version": "0.0.1",
5+
"version": "<% if (gitHubWorkFlowInit) { %>0.0.0<% } else { %>0.0.1<% } %>",
66
"engines": {
77
"vscode": <%- JSON.stringify(vsCodeEngine) %>
88
},
@@ -17,4 +17,4 @@
1717
}
1818
]
1919
}
20-
}
20+
}

0 commit comments

Comments
 (0)