parent
25cd4c9a30
commit
a8cf285df6
|
|
@ -59,7 +59,7 @@ public class Example {
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.microsoft.playwright</groupId>
|
<groupId>com.microsoft.playwright</groupId>
|
||||||
<artifactId>playwright</artifactId>
|
<artifactId>playwright</artifactId>
|
||||||
<version>1.17.1</version>
|
<version>1.23.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
|
|
|
||||||
|
|
@ -70,11 +70,12 @@ async function run() {
|
||||||
writeAssumeNoop(path.join(PROJECT_DIR, 'README.md'), content, dirtyFiles);
|
writeAssumeNoop(path.join(PROJECT_DIR, 'README.md'), content, dirtyFiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Patch docker version in docs
|
|
||||||
{
|
|
||||||
let playwrightVersion = require(path.join(PROJECT_DIR, 'package.json')).version;
|
let playwrightVersion = require(path.join(PROJECT_DIR, 'package.json')).version;
|
||||||
if (playwrightVersion.endsWith('-next'))
|
if (playwrightVersion.endsWith('-next'))
|
||||||
playwrightVersion = playwrightVersion.substring(0, playwrightVersion.indexOf('-next'));
|
playwrightVersion = playwrightVersion.substring(0, playwrightVersion.indexOf('-next'));
|
||||||
|
|
||||||
|
// Patch docker version in docs
|
||||||
|
{
|
||||||
const regex = new RegExp("(mcr.microsoft.com/playwright[^: ]*):?([^ ]*)");
|
const regex = new RegExp("(mcr.microsoft.com/playwright[^: ]*):?([^ ]*)");
|
||||||
for (const filePath of getAllMarkdownFiles(path.join(PROJECT_DIR, 'docs'))) {
|
for (const filePath of getAllMarkdownFiles(path.join(PROJECT_DIR, 'docs'))) {
|
||||||
let content = fs.readFileSync(filePath).toString();
|
let content = fs.readFileSync(filePath).toString();
|
||||||
|
|
@ -84,6 +85,16 @@ async function run() {
|
||||||
});
|
});
|
||||||
writeAssumeNoop(filePath, content, dirtyFiles);
|
writeAssumeNoop(filePath, content, dirtyFiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Patch pom.xml
|
||||||
|
{
|
||||||
|
const introPath = path.join(PROJECT_DIR, 'docs', 'src', 'intro-java.md');
|
||||||
|
const pomVersionRe = new RegExp('^(\\s*<artifactId>playwright<\\/artifactId>\\n\\s*<version>)(.*)(<\\/version>)$', 'gm');
|
||||||
|
let content = fs.readFileSync(introPath).toString();
|
||||||
|
const majorVersion = playwrightVersion.replace(new RegExp('((\\d+\\.){2})(\\d+)'), '$10')
|
||||||
|
content = content.replace(pomVersionRe, '$1' + majorVersion + '$3');
|
||||||
|
writeAssumeNoop(introPath, content, dirtyFiles);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update device descriptors
|
// Update device descriptors
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue