Skip to content

Commit 2e4429f

Browse files
committed
open-pr: support GNU TLS
The `PKGBUILD` files use a non-standard way to specify the `pkgver`. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent a5e9a03 commit 2e4429f

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

update-scripts/version/gnutls

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env node
2+
3+
// The `openssl` version is not actually stored in the `pkgver` variable, but in
4+
// `_ver` (because of the funny trailing letter in the OpenSSL v1.1.* versions)
5+
6+
(async () => {
7+
const version = process.argv[2]
8+
9+
const fs = require('fs')
10+
const lines = fs.readFileSync('PKGBUILD').toString('utf-8').split(/\r?\n/)
11+
lines.forEach((line, i) => {
12+
if ((match = line.match(/^(\s*_base_ver=)\S+/))) {
13+
lines[i] = `${match[1]}${version}`
14+
} else if ((match = line.match(/^(\s*pkgrel=)\S+/))) {
15+
lines[i] = `${match[1]}1`
16+
}
17+
})
18+
fs.writeFileSync('PKGBUILD', lines.join('\n'))
19+
})().catch(console.log)
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env node
2+
3+
// The `openssl` version is not actually stored in the `pkgver` variable, but in
4+
// `_ver` (because of the funny trailing letter in the OpenSSL v1.1.* versions)
5+
6+
(async () => {
7+
const version = process.argv[2]
8+
9+
const fs = require('fs')
10+
const lines = fs.readFileSync('PKGBUILD').toString('utf-8').split(/\r?\n/)
11+
lines.forEach((line, i) => {
12+
if ((match = line.match(/^(\s*_pkgver=)\S+/))) {
13+
lines[i] = `${match[1]}${version}`
14+
} else if ((match = line.match(/^(\s*pkgrel=)\S+/))) {
15+
lines[i] = `${match[1]}1`
16+
}
17+
})
18+
fs.writeFileSync('PKGBUILD', lines.join('\n'))
19+
})().catch(console.log)

0 commit comments

Comments
 (0)