Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
e89a0fc0
Commit
e89a0fc0
authored
Dec 26, 2009
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle check-in and tagging of patches dir.
parent
164faae8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
12 deletions
+35
-12
release-rsync
packaging/release-rsync
+35
-12
No files found.
packaging/release-rsync
View file @
e89a0fc0
#!/usr/bin/perl
use
strict
;
use
warnings
;
# This script expects the directory ~/samba-rsync-ftp to exist and to be a
# copy of the /home/ftp/pub/rsync dir on samba.org. When the script is done,
# the git repository in the current directory will be updated, and the local
# ~/samba-rsync-ftp dir will be ready to be rsynced to samba.org.
use
strict
;
use
warnings
;
use
Cwd
;
use
Getopt::
Long
;
use
Term::
ReadKey
;
...
...
@@ -62,9 +61,7 @@ die "There is no .git dir in the current directory.\n" unless -d '.git';
die
"'a' must not exist in the current directory.\n"
if
-
e
'a'
;
die
"'b' must not exist in the current directory.\n"
if
-
e
'b'
;
open
(
IN
,
'-|'
,
'git status'
)
or
die
$!
;
my
$status
=
join
(
''
,
<
IN
>
);
close
IN
;
my
$status
=
`git status`
;
die
"The checkout is not clean:\n"
,
$status
unless
$status
=~
/\nnothing to commit \(working directory clean\)/
;
my
(
$cur_branch
)
=
$status
=~
/^# On branch (.+)\n/
;
if
(
$cur_branch
ne
$master_branch
)
{
...
...
@@ -76,6 +73,19 @@ if ($cur_branch ne $master_branch) {
$master_branch
=
$cur_branch
;
}
if
(
-
d
'patches/.git'
)
{
$status
=
`cd patches && git status`
;
die
"The *patches* checkout is not clean:\n"
,
$status
unless
$status
=~
/\nnothing to commit \(working directory clean\)/
;
(
$cur_branch
)
=
$status
=~
/^# On branch (.+)\n/
;
if
(
$cur_branch
ne
$master_branch
)
{
print
"The *patches* checkout is on branch $cur_branch, not branch $master_branch.\n"
;
print
"Do you want to change it to branch $master_branch? [n] "
;
$_
=
<
STDIN
>
;
exit
1
unless
/^y/i
;
system
"cd patches && git checkout '$master_branch'"
;
}
}
my
$confversion
;
open
(
IN
,
'<'
,
'configure.in'
)
or
die
$!
;
while
(
<
IN
>
)
{
...
...
@@ -293,6 +303,10 @@ if ($ans =~ /^y/i) {
system
"packaging/patch-update --branch=$master_branch --shell"
;
}
if
(
-
d
'patches/.git'
)
{
system
"cd patches && git commit -a -m 'The patches for $version.'"
and
exit
1
;
}
print
$break
,
<<EOT;
About to:
...
...
@@ -310,6 +324,9 @@ EOT
print
"<Press Enter to continue> "
;
$_
=
<
STDIN
>
;
# We want to use our passphrase-providing "gpg" script, so modify the PATH.
$ENV
{
PATH
}
=
"$curdir/packaging/bin:$path"
;
my
$passphrase
;
while
(
1
)
{
ReadMode
(
'noecho'
);
...
...
@@ -327,17 +344,23 @@ while (1) {
umask
$oldmask
;
$ENV
{
'GPG_PASSFILE'
}
=
$passfile
;
# We want to use our passphrase-providing "gpg" script, so modify the PATH.
$ENV
{
PATH
}
=
"packaging/bin:$path"
;
$_
=
`git tag -s -m 'Version $version.' v$version 2>&1`
;
$ENV
{
PATH
}
=
$path
;
unlink
(
$passfile
);
print
$_
;
next
if
/bad passphrase/
;
last
unless
/failed/
;
exit
1
;
exit
1
if
/failed/
;
if
(
-
d
'patches/.git'
)
{
$_
=
`cd patches && git tag -s -m 'Version $version.' v$version 2>&1`
;
print
$_
;
exit
1
if
/bad passphrase|failed/
;
}
unlink
(
$passfile
);
last
;
}
$ENV
{
PATH
}
=
$path
;
# Extract the generated files from the old tar.
@_
=
@extra_files
;
map { s#^#rsync-$las
tversion
/
# } @_;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment