Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
72b97bed
Commit
72b97bed
authored
11 years ago
by
anttil
Browse files
Options
Downloads
Patches
Plain Diff
SWE-22 / SP-641: branching / tagging of project 'base'
SVN: 29104
parent
bb82adac
No related branches found
No related tags found
1 merge request
!40
SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
branch.sh
+1
-1
1 addition, 1 deletion
branch.sh
build.gradle
+17
-13
17 additions, 13 deletions
build.gradle
tag.sh
+1
-9
1 addition, 9 deletions
tag.sh
with
19 additions
and
23 deletions
branch.sh
+
1
−
1
View file @
72b97bed
...
@@ -12,7 +12,7 @@ svn checkout --depth=empty svn+ssh://svncisd.ethz.ch/repos/cisd/base/branches/$1
...
@@ -12,7 +12,7 @@ svn checkout --depth=empty svn+ssh://svncisd.ethz.ch/repos/cisd/base/branches/$1
cd
out/temp_checkout
cd
out/temp_checkout
svn update gradlew gradle build.gradle
svn update gradlew gradle build.gradle
./gradlew dependencyReport
./gradlew dependencyReport
cat
out/reports/project/dependencies.txt|egrep ^.---|
awk
'{print $2}'
|sort|uniq|egrep
-v
^
$
|
awk
-F
:
'{print "s/" $1 ":" $2 ":
+
/" $1 ":" $2 ":" $
3
"/g"}'
>
sed_commands
cat
out/reports/project/dependencies.txt|egrep ^.---|
grep
\>
|sort|uniq|awk
'{print $2 ":" $4}'
|awk
-F
:
'{print "s/" $1 ":" $2 ":
" $3 "
/" $1 ":" $2 ":" $
4
"/g"}'
>
sed_commands
sed
-f
sed_commands build.gradle
>
build.gradle.tmp
sed
-f
sed_commands build.gradle
>
build.gradle.tmp
mv
build.gradle.tmp build.gradle
mv
build.gradle.tmp build.gradle
svn commit build.gradle
-m
"fixed dependencies for branch
$1
"
svn commit build.gradle
-m
"fixed dependencies for branch
$1
"
...
...
This diff is collapsed.
Click to expand it.
build.gradle
+
17
−
13
View file @
72b97bed
...
@@ -12,22 +12,26 @@ dependencies {
...
@@ -12,22 +12,26 @@ dependencies {
group
=
"cisd"
group
=
"cisd"
version
=
"UNSPECIFIED_VERSION"
new
ByteArrayOutputStream
().
withStream
{
os
->
def
result
=
exec
{
if
(
version
.
equals
(
"UNSPECIFIED_VERSION"
))
{
executable
=
'svn'
new
ByteArrayOutputStream
().
withStream
{
os
->
args
=
[
'info'
]
def
result
=
exec
{
standardOutput
=
os
executable
=
'svn'
}
args
=
[
'info'
]
def
outputAsString
=
os
.
toString
()
standardOutput
=
os
def
matchLastChangedRevMatcher
=
outputAsString
=~
/Last Changed Rev: (\d+)/
}
def
urlMatcher
=
outputAsString
=~
/URL: .*\/(.+)/
def
outputAsString
=
os
.
toString
()
def
matchLastChangedRev
=
outputAsString
=~
/Last Changed Rev: (\d+)/
def
revision
=
"r${matchLastChangedRevMatcher[0][1]}"
project
.
version
=
"r${matchLastChangedRev[0][1]}"
def
branch
=
urlMatcher
[
0
][
1
]
if
(
branch
.
equals
(
'trunk'
))
{
project
.
version
=
revision
}
else
{
project
.
version
=
branch
}
}
}
}
publishing
{
publishing
{
publications
{
publications
{
ivy
(
IvyPublication
)
{
ivy
(
IvyPublication
)
{
...
...
This diff is collapsed.
Click to expand it.
tag.sh
+
1
−
9
View file @
72b97bed
...
@@ -5,13 +5,5 @@ if [ $? -ne 0 ]; then echo "Branch does not exist!"; exit 1; fi
...
@@ -5,13 +5,5 @@ if [ $? -ne 0 ]; then echo "Branch does not exist!"; exit 1; fi
svn info svn+ssh://svncisd.ethz.ch/repos/cisd/base/tags/
$1
/
$2
2>/dev/null
svn info svn+ssh://svncisd.ethz.ch/repos/cisd/base/tags/
$1
/
$2
2>/dev/null
if
[
$?
-eq
0
]
;
then
echo
"Tag already exists!"
;
exit
1
;
fi
if
[
$?
-eq
0
]
;
then
echo
"Tag already exists!"
;
exit
1
;
fi
svn
mkdir
--parents
svn+ssh://svncisd.ethz.ch/repos/cisd/base/tags/
$1
-m
"create tag folders
$1
/
$2
"
svn copy svn+ssh://svncisd.ethz.ch/repos/cisd/base/branches/
$1
svn+ssh://svncisd.ethz.ch/repos/cisd/base/tags/
$1
/
$2
-m
"create tag
$1
/
$2
"
svn copy svn+ssh://svncisd.ethz.ch/repos/cisd/base/branches/
$1
svn+ssh://svncisd.ethz.ch/repos/cisd/base/tags/
$1
/
$2
-m
"create tag
$1
/
$2
"
mkdir
-p
out
rm
-r
out/temp_checkout
svn checkout
--depth
=
empty svn+ssh://svncisd.ethz.ch/repos/cisd/base/tags/
$1
/
$2
out/temp_checkout
cd
out/temp_checkout
svn update build.gradle
sed
-e
"s/version=
\"
UNSPECIFIED_VERSION
\"
/version=
\"
$2
\"
/"
build.gradle
>
build.gradle.tmp
mv
build.gradle.tmp build.gradle
#svn commit build.gradle -m "fixed version for tag $1/$2"
cd
../..
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment