Skip to content

Commit

Permalink
Set version to 0.0.0 if using GitHub workflow file
Browse files Browse the repository at this point in the history
  • Loading branch information
badsyntax committed Dec 9, 2019
1 parent e785f6b commit ff8c320
Show file tree
Hide file tree
Showing 17 changed files with 58 additions and 57 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ jobs:
tag=${GITHUB_REF#refs/tags/}
echo "Setting package version $tag"
npm --no-git-tag-version version "$tag"
npm install -g vsce
vsce package
npx vsce package
- name: Publish extension to marketplace
env:
AZURE_TOKEN: ${{ secrets.AZURE_TOKEN }}
run: |
vsce publish -p "$AZURE_TOKEN"
npx vsce publish -p "$AZURE_TOKEN"
4 changes: 2 additions & 2 deletions generators/app/templates/ext-colortheme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": <%- JSON.stringify(name) %>,
"displayName": <%- JSON.stringify(displayName) %>,
"description": <%- JSON.stringify(description) %>,
"version": "0.0.1",
"version": "<% if (gitHubWorkFlowInit) { %>0.0.0<% } else { %>0.0.1<% } %>",
"engines": {
"vscode": <%- JSON.stringify(vsCodeEngine) %>
},
Expand All @@ -18,4 +18,4 @@
}
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,9 @@ jobs:
tag=${GITHUB_REF#refs/tags/}
echo "Setting package version $tag"
npm --no-git-tag-version version "$tag"
npm install -g vsce
vsce package
npx vsce package
- name: Publish extension to marketplace
env:
AZURE_TOKEN: ${{ secrets.AZURE_TOKEN }}
run: |
vsce publish -p "$AZURE_TOKEN"
npx vsce publish -p "$AZURE_TOKEN"
2 changes: 1 addition & 1 deletion generators/app/templates/ext-command-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": <%- JSON.stringify(name) %>,
"displayName": <%- JSON.stringify(displayName) %>,
"description": <%- JSON.stringify(description) %>,
"version": "0.0.1",
"version": "<% if (gitHubWorkFlowInit) { %>0.0.0<% } else { %>0.0.1<% } %>",
"engines": {
"vscode": <%- JSON.stringify(vsCodeEngine) %>
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,9 @@ jobs:
tag=${GITHUB_REF#refs/tags/}
echo "Setting package version $tag"
npm --no-git-tag-version version "$tag"
npm install -g vsce
vsce package
npx vsce package
- name: Publish extension to marketplace
env:
AZURE_TOKEN: ${{ secrets.AZURE_TOKEN }}
run: |
vsce publish -p "$AZURE_TOKEN"
npx vsce publish -p "$AZURE_TOKEN"
2 changes: 1 addition & 1 deletion generators/app/templates/ext-command-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": <%- JSON.stringify(name) %>,
"displayName": <%- JSON.stringify(displayName) %>,
"description": <%- JSON.stringify(description) %>,
"version": "0.0.1",
"version": "<% if (gitHubWorkFlowInit) { %>0.0.0<% } else { %>0.0.1<% } %>",
"engines": {
"vscode": <%- JSON.stringify(vsCodeEngine) %>
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ jobs:
tag=${GITHUB_REF#refs/tags/}
echo "Setting package version $tag"
npm --no-git-tag-version version "$tag"
npm install -g vsce
vsce package
npx vsce package
- name: Publish extension to marketplace
env:
AZURE_TOKEN: ${{ secrets.AZURE_TOKEN }}
run: |
vsce publish -p "$AZURE_TOKEN"
npx vsce publish -p "$AZURE_TOKEN"
4 changes: 2 additions & 2 deletions generators/app/templates/ext-extensionpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": <%- JSON.stringify(name) %>,
"displayName": <%- JSON.stringify(displayName) %>,
"description": <%- JSON.stringify(description) %>,
"version": "0.0.1",
"version": "<% if (gitHubWorkFlowInit) { %>0.0.0<% } else { %>0.0.1<% } %>",
"engines": {
"vscode": <%- JSON.stringify(vsCodeEngine) %>
},
Expand All @@ -13,4 +13,4 @@
"<%- extensionList[i] %>", <%}%>
"<%- extensionList[extensionList.length-1]%>"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ jobs:
tag=${GITHUB_REF#refs/tags/}
echo "Setting package version $tag"
npm --no-git-tag-version version "$tag"
npm install -g vsce
vsce package
npx vsce package
- name: Publish extension to marketplace
env:
AZURE_TOKEN: ${{ secrets.AZURE_TOKEN }}
run: |
vsce publish -p "$AZURE_TOKEN"
npx vsce publish -p "$AZURE_TOKEN"
4 changes: 2 additions & 2 deletions generators/app/templates/ext-keymap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": <%- JSON.stringify(name) %>,
"displayName": <%- JSON.stringify(displayName) %>,
"description": <%- JSON.stringify(description) %>,
"version": "0.0.1",
"version": "<% if (gitHubWorkFlowInit) { %>0.0.0<% } else { %>0.0.1<% } %>",
"engines": {
"vscode": <%- JSON.stringify(vsCodeEngine) %>
},
Expand All @@ -17,4 +17,4 @@
}
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ jobs:
tag=${GITHUB_REF#refs/tags/}
echo "Setting package version $tag"
npm --no-git-tag-version version "$tag"
npm install -g vsce
vsce package
npx vsce package
- name: Publish extension to marketplace
env:
AZURE_TOKEN: ${{ secrets.AZURE_TOKEN }}
run: |
vsce publish -p "$AZURE_TOKEN"
npx vsce publish -p "$AZURE_TOKEN"
4 changes: 2 additions & 2 deletions generators/app/templates/ext-language/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": <%- JSON.stringify(name) %>,
"displayName": <%- JSON.stringify(displayName) %>,
"description": <%- JSON.stringify(description) %>,
"version": "0.0.1",
"version": "<% if (gitHubWorkFlowInit) { %>0.0.0<% } else { %>0.0.1<% } %>",
"engines": {
"vscode": <%- JSON.stringify(vsCodeEngine) %>
},
Expand All @@ -22,4 +22,4 @@
"path": <%- JSON.stringify("./syntaxes/" + languageFileName) %>
}]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ jobs:
tag=${GITHUB_REF#refs/tags/}
echo "Setting package version $tag"
npm --no-git-tag-version version "$tag"
npm install -g vsce
vsce package
npx vsce package
- name: Publish extension to marketplace
env:
AZURE_TOKEN: ${{ secrets.AZURE_TOKEN }}
run: |
vsce publish -p "$AZURE_TOKEN"
npx vsce publish -p "$AZURE_TOKEN"
2 changes: 1 addition & 1 deletion generators/app/templates/ext-localization/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": <%- JSON.stringify(name) %>,
"displayName": <%- JSON.stringify(displayName) %>,
"description": <%- JSON.stringify(description) %>,
"version": "0.0.1",
"version": "<% if (gitHubWorkFlowInit) { %>0.0.0<% } else { %>0.0.1<% } %>",
"engines": {
"vscode": <%- JSON.stringify(vsCodeEngine) %>
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ jobs:
tag=${GITHUB_REF#refs/tags/}
echo "Setting package version $tag"
npm --no-git-tag-version version "$tag"
npm install -g vsce
vsce package
npx vsce package
- name: Publish extension to marketplace
env:
AZURE_TOKEN: ${{ secrets.AZURE_TOKEN }}
run: |
vsce publish -p "$AZURE_TOKEN"
npx vsce publish -p "$AZURE_TOKEN"
2 changes: 1 addition & 1 deletion generators/app/templates/ext-snippets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": <%- JSON.stringify(name) %>,
"displayName": <%- JSON.stringify(displayName) %>,
"description": <%- JSON.stringify(description) %>,
"version": "0.0.1",
"version": "<% if (gitHubWorkFlowInit) { %>0.0.0<% } else { %>0.0.1<% } %>",
"engines": {
"vscode": <%- JSON.stringify(vsCodeEngine) %>
},
Expand Down
Loading

0 comments on commit ff8c320

Please sign in to comment.