Skip to content

Commit 43c9344

Browse files
authored
Merge pull request #110 from git-for-windows/open-pr-runtime
open-pr: use more pleasant commit/PR titles when handling the `msys2-runtime` package
2 parents 2cabd52 + 8c07a4c commit 43c9344

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

.github/workflows/open-pr.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,12 @@ jobs:
119119
update_script="$GITHUB_WORKSPACE/update-scripts/version/$PACKAGE_TO_UPGRADE"
120120
if test -f "$update_script"
121121
then
122-
$update_script "$UPGRADE_TO_VERSION"
122+
$update_script "$UPGRADE_TO_VERSION" &&
123+
if test -f UPGRADE_TO_VERSION
124+
then
125+
UPGRADE_TO_VERSION="$(cat UPGRADE_TO_VERSION)" &&
126+
rm UPGRADE_TO_VERSION
127+
fi
123128
else
124129
sed -i \
125130
-e "s/^\\(pkgver=\\).*/\\1$UPGRADE_TO_VERSION/" \

update-scripts/version/bash

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
let [ , basever, patchlevel ] = version.match(/^(\d+\.\d+)\.(\d+)/)
1313
let match
14-
14+
1515
const fs = require('fs')
1616
const lines = fs.readFileSync('PKGBUILD').toString('utf-8').split(/\r?\n/)
1717
lines.forEach((line, i) => {

update-scripts/version/msys2-runtime

+3-1
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,6 @@ if test -n "$update_pkgver"
7676
then
7777
git reset --soft HEAD^ &&
7878
sed -i 's/^pkgrel=.*/pkgrel=1/' PKGBUILD
79-
fi
79+
fi &&
80+
sed -n '/^pkgver=/{:1;N;/pkgrel=/{s/.*pkgver=\([0-9\.]*\).*pkgrel=\([0-9]*\).*/\1-\2/p;q};b1}' \
81+
<PKGBUILD >UPGRADE_TO_VERSION

0 commit comments

Comments
 (0)