Skip to content

Commit

Permalink
Merge branch 'main' into update_changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
dibarbet authored Oct 25, 2024
2 parents 4a75f23 + e57375e commit 61a7d3e
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/branch-snap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
- name: Install dependencies
run: npm ci
- name: Update version.json
run: npx gulp incrementVersionJson
- name: Create version.json update PR
run: npx gulp incrementVersion
- name: Create version update PR
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- Diagnostics related feature requests and improvements [#5951](https://github.com/dotnet/vscode-csharp/issues/5951)
- Debug from .csproj and .sln [#5876](https://github.com/dotnet/vscode-csharp/issues/5876)

# Latest
# 2.54.x
* Update debugger packages to v2.54.0 (PR: [#7691](https://github.com/dotnet/vscode-csharp/pull/7691))
* Only show misc files warning toast after delay. (PR: [#7689](https://github.com/dotnet/vscode-csharp/pull/7689))
* Update Roslyn to 4.13.0-1.24525.2 (PR: [#7694](https://github.com/dotnet/vscode-csharp/pull/7694))
Expand Down
38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@
{
"id": "Debugger",
"description": ".NET Core Debugger (Windows / x64)",
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-52-0/coreclr-debug-win7-x64.zip",
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-54-0/coreclr-debug-win7-x64.zip",
"installPath": ".debugger/x86_64",
"platforms": [
"win32"
Expand All @@ -430,12 +430,12 @@
"arm64"
],
"installTestPath": "./.debugger/x86_64/vsdbg-ui.exe",
"integrity": "65431717FC1BF1F3CDA4E2ABE4E42A67564C4F6A4A0A7A38D0EC2120AB3E53E4"
"integrity": "CA52132B8EE9AD1C7367CEA603DBDAC67D32E1A15845545376E4A23D609D80FF"
},
{
"id": "Debugger",
"description": ".NET Core Debugger (Windows / ARM64)",
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-52-0/coreclr-debug-win10-arm64.zip",
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-54-0/coreclr-debug-win10-arm64.zip",
"installPath": ".debugger/arm64",
"platforms": [
"win32"
Expand All @@ -444,12 +444,12 @@
"arm64"
],
"installTestPath": "./.debugger/arm64/vsdbg-ui.exe",
"integrity": "F2D3A2E45A749D714EA165EF939C955E4BE3B99C7A82919B2563E38733F2C135"
"integrity": "09DF819BE86FD8A481152433E97268C07E985DEE9BBDE17FEA1DA0B339BAD873"
},
{
"id": "Debugger",
"description": ".NET Core Debugger (macOS / x64)",
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-52-0/coreclr-debug-osx-x64.zip",
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-54-0/coreclr-debug-osx-x64.zip",
"installPath": ".debugger/x86_64",
"platforms": [
"darwin"
Expand All @@ -463,12 +463,12 @@
"./vsdbg"
],
"installTestPath": "./.debugger/x86_64/vsdbg-ui",
"integrity": "417C7D0477B0ABC04F5AD296100BDDA754B0BB513329206BA096A568CA9A846B"
"integrity": "2C7AD1AA13A8382EFD53AC26A474BE5223EB81295EA9C39E62174CB8626F6473"
},
{
"id": "Debugger",
"description": ".NET Core Debugger (macOS / arm64)",
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-52-0/coreclr-debug-osx-arm64.zip",
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-54-0/coreclr-debug-osx-arm64.zip",
"installPath": ".debugger/arm64",
"platforms": [
"darwin"
Expand All @@ -481,12 +481,12 @@
"./vsdbg"
],
"installTestPath": "./.debugger/arm64/vsdbg-ui",
"integrity": "84A4DAA9420B9734585845317CC920CD75AAFF4C740ED4619870D1EFD9375498"
"integrity": "9B934EF920DFFDA3241B8107A777E5B5F6EDC6E2810C760B985D7879C705ABD3"
},
{
"id": "Debugger",
"description": ".NET Core Debugger (linux / ARM)",
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-52-0/coreclr-debug-linux-arm.zip",
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-54-0/coreclr-debug-linux-arm.zip",
"installPath": ".debugger",
"platforms": [
"linux"
Expand All @@ -499,12 +499,12 @@
"./vsdbg"
],
"installTestPath": "./.debugger/vsdbg-ui",
"integrity": "EDF8B6D14FE42C4732ADFA0794A550D0BE71B6F5CD18D4636132B4DFED76B7DA"
"integrity": "C7862D26B66EA20D607D163A210430576E1B94EE7E30DEDFFF0979818CBC448F"
},
{
"id": "Debugger",
"description": ".NET Core Debugger (linux / ARM64)",
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-52-0/coreclr-debug-linux-arm64.zip",
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-54-0/coreclr-debug-linux-arm64.zip",
"installPath": ".debugger",
"platforms": [
"linux"
Expand All @@ -517,12 +517,12 @@
"./vsdbg"
],
"installTestPath": "./.debugger/vsdbg-ui",
"integrity": "381D1496318B854BB6C3544D7D0D51C9356618D6BEF33438EB26F13FA4DB8AF4"
"integrity": "59928535D55E29B501E3B75FB5CA328BC5AFD0E5D1B3DC85BD138B89163A9B96"
},
{
"id": "Debugger",
"description": ".NET Core Debugger (linux musl / x64)",
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-52-0/coreclr-debug-linux-musl-x64.zip",
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-54-0/coreclr-debug-linux-musl-x64.zip",
"installPath": ".debugger",
"platforms": [
"linux-musl"
Expand All @@ -535,12 +535,12 @@
"./vsdbg"
],
"installTestPath": "./.debugger/vsdbg-ui",
"integrity": "C7D9B3FCB947798540F24C3784604367CA51C2D52AE69C515525DD7DCA5C1C17"
"integrity": "70899D68697E158CAFC6B4C69D8CC894AF307D82DC884167ED8E408D31A90BEE"
},
{
"id": "Debugger",
"description": ".NET Core Debugger (linux musl / ARM64)",
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-52-0/coreclr-debug-linux-musl-arm64.zip",
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-54-0/coreclr-debug-linux-musl-arm64.zip",
"installPath": ".debugger",
"platforms": [
"linux-musl"
Expand All @@ -553,12 +553,12 @@
"./vsdbg"
],
"installTestPath": "./.debugger/vsdbg-ui",
"integrity": "6D69141D92DF968755D36FABB73C34F8232108E0B563D3B20A59CFD1FF1BBDD2"
"integrity": "7E6440DEF000329162FFFBC97114F33CF83B9C2020D44A1AC0E4407531B4C8F8"
},
{
"id": "Debugger",
"description": ".NET Core Debugger (linux / x64)",
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-52-0/coreclr-debug-linux-x64.zip",
"url": "https://vsdebugger.azureedge.net/coreclr-debug-2-54-0/coreclr-debug-linux-x64.zip",
"installPath": ".debugger",
"platforms": [
"linux"
Expand All @@ -571,7 +571,7 @@
"./vsdbg"
],
"installTestPath": "./.debugger/vsdbg-ui",
"integrity": "A35AB54ED50822DBB98BA10A1065FEF9EA7BE49406291DFE6D74E116EBECF177"
"integrity": "5099BF747D2D20437A6743F02920015DC6A9809956DBAE12C41CDF97C969F19D"
},
{
"id": "RazorOmnisharp",
Expand Down Expand Up @@ -5602,4 +5602,4 @@
}
}
}
}
}
42 changes: 41 additions & 1 deletion tasks/snapTasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,61 @@
import * as gulp from 'gulp';
import * as fs from 'fs';
import * as path from 'path';
import * as os from 'os';

gulp.task('incrementVersionJson', async (): Promise<void> => {
gulp.task('incrementVersion', async (): Promise<void> => {
// Get the current version from version.json
const versionFilePath = path.join(path.resolve(__dirname, '..'), 'version.json');
const file = fs.readFileSync(versionFilePath, 'utf8');
const versionJson = JSON.parse(file);

// Increment the minor version
const version = versionJson.version as string;
const split = version.split('.');
const newVersion = `${split[0]}.${parseInt(split[1]) + 1}`;

console.log(`Updating ${version} to ${newVersion}`);

// Write the new version back to version.json
versionJson.version = newVersion;
const newJson = JSON.stringify(versionJson, null, 4);
console.log(`New json: ${newJson}`);

fs.writeFileSync(versionFilePath, newJson);

// Add a new changelog section for the new version.
console.log('Adding new version header to changelog');

const changelogPath = path.join(path.resolve(__dirname, '..'), 'CHANGELOG.md');
const changelogContent = fs.readFileSync(changelogPath, 'utf8');
const changelogLines = changelogContent.split(os.EOL);

// Find all the headers in the changelog (and their line numbers)
const headerRegex = /^#+\s+.*$/gm;
const matches = [];
for (let i = 0; i < changelogLines.length; i++) {
const line = changelogLines.at(i);
const match = headerRegex.exec(line!);
if (match) {
matches.push({ line: i, text: match[0] });
}
}

// Find the known issues header, then find the next header after it.
const knownIssuesHeader = matches.find((m) => m.text.includes('Known Issues'));
if (knownIssuesHeader === undefined) {
throw new Error('Could not find the known issues header in the changelog.');
}
const knownIssuesIndex = matches.indexOf(knownIssuesHeader);
if (knownIssuesIndex === -1) {
throw new Error('Could not find the known issues index in the matches.');
}

// Insert a new header for the new version after the known issues header but before the next header.
const lineToInsertAt = matches[knownIssuesIndex + 1].line - 1;
console.log(`Inserting new version header at line ${lineToInsertAt}`);
const linesToInsert = ['', `# ${newVersion}.x`];

changelogLines.splice(lineToInsertAt, 0, ...linesToInsert);
fs.writeFileSync(changelogPath, changelogLines.join(os.EOL));
});

0 comments on commit 61a7d3e

Please sign in to comment.