Annotation of /trunk/pkgtools/svn-tag.sh
Parent Directory | Revision Log
Revision 3111 -
(hide annotations)
(download)
(as text)
Fri Mar 15 11:25:59 2019 UTC (5 years, 6 months ago) by niro
File MIME type: application/x-sh
File size: 550 byte(s)
Fri Mar 15 11:25:59 2019 UTC (5 years, 6 months ago) by niro
File MIME type: application/x-sh
File size: 550 byte(s)
-fixed URL regex
1 | niro | 821 | #!/bin/bash |
2 | export LC_ALL=C | ||
3 | |||
4 | usage() | ||
5 | { | ||
6 | echo "Usage: $(basename $0) TAG [MESSAGE]" | ||
7 | echo | ||
8 | echo "Message is optional, you must run this script within a svn tree." | ||
9 | echo | ||
10 | exit 1 | ||
11 | } | ||
12 | |||
13 | TAG="$1" | ||
14 | MESSAGE="$2" | ||
15 | [[ -z ${TAG} ]] && usage | ||
16 | [[ -z ${Message} ]] && MESSAGE="tagged '${TAG}'" | ||
17 | |||
18 | niro | 3111 | URI="$(svn info | grep '^URL:' | cut -d' ' -f2)" |
19 | niro | 821 | [[ $? -ne 0 ]] && usage |
20 | REPO_ROOT="$(svn info | grep 'Repository Root:' | cut -d' ' -f3)" | ||
21 | [[ $? -ne 0 ]] && usage | ||
22 | |||
23 | echo "tagging ${URI} with '${TAG}'..." | ||
24 | niro | 1331 | svn copy -m "${MESSAGE}" "${URI}" "${REPO_ROOT}/${SUBDIR}/tags/${TAG}" |
Properties
Name | Value |
---|---|
svn:keywords | Id |