Skip to content

Commit

Permalink
chore: auto update example pw version in pom (#1748)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt authored Feb 13, 2025
1 parent 995cf90 commit bc82f2f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
3 changes: 2 additions & 1 deletion examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
<name>Playwright Client Examples</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<playwright.version>1.49.0</playwright.version>
</properties>
<dependencies>
<dependency>
<groupId>com.microsoft.playwright</groupId>
<artifactId>playwright</artifactId>
<version>1.41.0</version>
<version>${playwright.version}</version>
</dependency>
</dependencies>
<build>
Expand Down
12 changes: 11 additions & 1 deletion scripts/roll_driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,14 @@ else
fi;

./generate_api.sh
./update_readme.sh
./update_readme.sh

node -e "$(cat <<EOF
let [majorVersion, minorVersion] = process.argv[1].split('-')[0].split('.').map(part => parseInt(part, 10));
minorVersion[1]--;
const previousMajorVersion = majorVersion + '.' + minorVersion + '.0';
fs.writeFileSync('../examples/pom.xml', fs.readFileSync('../examples/pom.xml', 'utf8')
.replace(/<playwright\.version>.*<\/playwright\.version>/, '<playwright\.version>' + previousMajorVersion + '</playwright\.version>')
);
EOF
)" $NEW_VERSION

0 comments on commit bc82f2f

Please sign in to comment.