Skip to content

Commit 2c96e92

Browse files
committed
Remove the -vscode suffix from release tags and all related version handling
- don't suffix releases with `- VS Code` - tags should not be suffixed with `-vscode`. don't make any migrations - we will remove all current tags with this suffix.
1 parent 95fb186 commit 2c96e92

4 files changed

Lines changed: 13 additions & 16 deletions

File tree

‎.github/workflows/github-release.yml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
- name: Check if tag exists
6363
id: check_tag
6464
run: |
65-
if git ls-remote --tags origin "refs/tags/${{ steps.package_version.outputs.raw_version }}-vscode" | grep -q 'refs/tags/'; then
65+
if git ls-remote --tags origin "refs/tags/${{ steps.package_version.outputs.raw_version }}" | grep -q 'refs/tags/'; then
6666
echo "exists=true" >> $GITHUB_OUTPUT
6767
else
6868
echo "exists=false" >> $GITHUB_OUTPUT
@@ -71,9 +71,9 @@ jobs:
7171
- name: Generate Release Notes
7272
if: steps.check_tag.outputs.exists == 'false'
7373
run: |
74-
PREV_TAG=$(git describe --tags --match "*-vscode" --abbrev=0 2>/dev/null || echo "")
74+
PREV_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
7575
76-
echo "### What's changed in the VS Code extension:" > release_notes.md
76+
echo "### What's changed in CWC:" > release_notes.md
7777
echo "" >> release_notes.md
7878
7979
CHANGELOG_PATHS=(
@@ -93,7 +93,7 @@ jobs:
9393
if: steps.check_tag.outputs.exists == 'false'
9494
uses: softprops/action-gh-release@v3
9595
with:
96-
tag_name: ${{ steps.package_version.outputs.raw_version }}-vscode
97-
name: ${{ steps.package_version.outputs.raw_version }} - VS Code
96+
tag_name: ${{ steps.package_version.outputs.raw_version }}
97+
name: ${{ steps.package_version.outputs.raw_version }}
9898
body_path: release_notes.md
9999
target_commitish: ${{ github.sha }}

‎apps/editor/src/commands/install-specific-version-command.ts‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,7 @@ export const install_specific_version_command = (
3838
break
3939
}
4040

41-
const vscode_tags = res.data.filter((tag: any) =>
42-
tag.name?.endsWith('-vscode')
43-
)
44-
tags.push(...vscode_tags)
41+
tags.push(...res.data.filter((tag: any) => tag.name))
4542

4643
if (res.data.length < 100) {
4744
break
@@ -70,7 +67,7 @@ export const install_specific_version_command = (
7067
}
7168

7269
const items = tags.map((tag) => {
73-
const version = tag.name.replace('-vscode', '')
70+
const version = tag.name
7471
let description = tag.commit?.sha?.substring(0, 7)
7572

7673
const parts = version.split('.')
@@ -143,7 +140,7 @@ export const install_specific_version_command = (
143140
quick_pick.placeholder = t(
144141
'command.install-specific-version-command.select-version'
145142
)
146-
const current_tag = `${extension_context.extension.packageJSON.version}-vscode`
143+
const current_tag = extension_context.extension.packageJSON.version
147144
quick_pick.items = items
148145
quick_pick.activeItems = items.filter((item) => item.tag === current_tag)
149146
quick_pick.matchOnDetail = true

‎apps/editor/src/utils/fetch-update-info.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ export const fetch_update_info = async (
6464
if (!Array.isArray(tags) || tags.length === 0) break
6565

6666
for (const tag of tags) {
67-
if (tag.name?.endsWith('-vscode')) {
68-
const latest_version = tag.name.replace('-vscode', '')
67+
if (tag.name) {
68+
const latest_version = tag.name
6969
if (is_newer(latest_version, current_version)) {
7070
if (minimum_release_age > 0) {
7171
const tag_age_days = await get_version_age_days(
@@ -79,7 +79,7 @@ export const fetch_update_info = async (
7979

8080
const current_version_age_days = await get_version_age_days(
8181
current_version,
82-
`${current_version}-vscode`
82+
current_version
8383
)
8484

8585
return {

‎apps/editor/src/views/prompt/frontend/Home/Home.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ export const Home: React.FC<Props> = (props) => {
226226
e.stopPropagation()
227227
post_message(props.vscode, {
228228
command: 'OPEN_WEBSITE',
229-
url: `https://github.com/CodeWebChat/CWC/releases#release-${props.update_info.latest_version}-vscode`
229+
url: `https://github.com/CodeWebChat/CWC/releases#release-${props.update_info.latest_version}`
230230
})
231231
}}
232232
>
@@ -355,7 +355,7 @@ export const Home: React.FC<Props> = (props) => {
355355
e.preventDefault()
356356
post_message(props.vscode, {
357357
command: 'OPEN_WEBSITE',
358-
url: `https://github.com/CodeWebChat/CWC/releases#release-${props.version}-vscode`
358+
url: `https://github.com/CodeWebChat/CWC/releases#release-${props.version}`
359359
})
360360
}}
361361
>

0 commit comments

Comments
 (0)