summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/create-release.sh11
-rw-r--r--tools/sane-find-scanner.c2
2 files changed, 5 insertions, 8 deletions
diff --git a/tools/create-release.sh b/tools/create-release.sh
index 7b0ed2d..99ef3a5 100755
--- a/tools/create-release.sh
+++ b/tools/create-release.sh
@@ -4,9 +4,7 @@
#
# License: GPL-3.0+
-GROUP=sane-project
-PROJECT=backends
-PROJECT_ID=$GROUP%2F$PROJECT
+PROJECT_ID=$CI_PROJECT_ID
API_ENDPOINT=https://gitlab.com/api/v4
@@ -18,17 +16,16 @@ upload () {
--request POST \
$API_ENDPOINT/projects/$PROJECT_ID/uploads \
| jq --raw-output .url \
- | sed "s|^|https://gitlab.com/$GROUP/$PROJECT|"
+ | sed "s|^|https://gitlab.com/-/project/$PROJECT_ID|"
}
cat << EOF > release.json
{
"name": "SANE Backends $CI_COMMIT_TAG",
"tag_name": "$CI_COMMIT_TAG",
- "description": "$(sed '1,3d; / /{s/.*//; q}' NEWS \
+ "description": $(sed '1,9d;/\x0c/,$d' NEWS \
| git stripspace \
- | sed 's/"/\\"/g; s/$/\\n/g' \
- | tr -d '\n')",
+ | jq -Rs),
"assets": {
"links": [
EOF
diff --git a/tools/sane-find-scanner.c b/tools/sane-find-scanner.c
index b4608c3..f8f3df5 100644
--- a/tools/sane-find-scanner.c
+++ b/tools/sane-find-scanner.c
@@ -109,7 +109,7 @@ static scsiblk inquiry = {
static void
usage (char *msg)
{
- fprintf (stderr, "Usage: %s [-hvqf] [devname ...]\n", prog_name);
+ fprintf (stderr, "Usage: %s [-hvqfp] [devname ...]\n", prog_name);
fprintf (stderr, "\t-h: print this help message\n");
fprintf (stderr, "\t-v: be more verbose (can be used multiple times)\n");
fprintf (stderr, "\t-q: be quiet (print only devices, no comments)\n");