Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
7f2ef061
Commit
7f2ef061
authored
16 years ago
by
Julien Bonjean
Browse files
Options
Downloads
Patches
Plain Diff
[#1317] Centralized version handling
parent
40421372
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
tools/build-system/launch-build-machine.sh
+19
-17
19 additions, 17 deletions
tools/build-system/launch-build-machine.sh
tools/build-system/sfl-git-dch.sh
+5
-27
5 additions, 27 deletions
tools/build-system/sfl-git-dch.sh
with
24 additions
and
44 deletions
tools/build-system/launch-build-machine.sh
+
19
−
17
View file @
7f2ef061
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
# Author: Julien Bonjean (julien@bonjean.info)
# Author: Julien Bonjean (julien@bonjean.info)
#
#
# Creation Date: 2009-04-20
# Creation Date: 2009-04-20
# Last Modified: 2009-05-28 1
7:59
:1
4
-0400
# Last Modified: 2009-05-28 1
8:30
:1
7
-0400
#####################################################
#####################################################
#
#
...
@@ -62,7 +62,6 @@ PACKAGING_RESULT_DIR=${ROOT_DIR}/packages-${TAG}
...
@@ -62,7 +62,6 @@ PACKAGING_RESULT_DIR=${ROOT_DIR}/packages-${TAG}
USER
=
"sflphone"
USER
=
"sflphone"
RELEASE_MODE
=
RELEASE_MODE
=
VERSION_APPEND
=
SNAPSHOT_TAG
=
`
date
+%s
`
SNAPSHOT_TAG
=
`
date
+%s
`
...
@@ -198,11 +197,8 @@ echo
...
@@ -198,11 +197,8 @@ echo
if
[
${
RELEASE_MODE
}
]
;
then
if
[
${
RELEASE_MODE
}
]
;
then
echo
"Release mode :
${
RELEASE_MODE
}
"
echo
"Release mode :
${
RELEASE_MODE
}
"
if
[
"
${
RELEASE_MODE
}
"
!=
"release"
]
;
then
VERSION_APPEND
=
"~
${
RELEASE_MODE
}
"
fi
else
else
echo
"Snapshot mode"
echo
"Snapshot mode
:
${
SNAPSHOT_TAG
}
"
fi
fi
#########################
#########################
...
@@ -227,13 +223,22 @@ if [ ${DO_PREPARE} ]; then
...
@@ -227,13 +223,22 @@ if [ ${DO_PREPARE} ]; then
VERSION
=
`
cd
${
REPOSITORY_DIR
}
&&
git describe
--tag
HEAD |
cut
-d
"/"
-f2
|
cut
-d
"-"
-f1
`
VERSION
=
`
cd
${
REPOSITORY_DIR
}
&&
git describe
--tag
HEAD |
cut
-d
"/"
-f2
|
cut
-d
"-"
-f1
`
if
[
${
RELEASE_MODE
}
]
;
then
if
[
"
${
RELEASE_MODE
}
"
!=
"release"
]
;
then
VERSION
=
"
${
VERSION
}
~
${
RELEASE_MODE
}
"
fi
else
VERSION
=
"
${
VERSION
}
-snapshot-
${
SNAPSHOT_TAG
}
"
fi
echo
"Version is :
${
VERSION
}
"
# if push is activated
# if push is activated
if
[
${
DO_PUSH
}
]
;
then
if
[
${
DO_PUSH
}
]
;
then
# first changelog generation for commit
# first changelog generation for commit
echo
"Update debian changelogs (1/2)"
echo
"Update debian changelogs (1/2)"
${
SCRIPTS_DIR
}
/sfl-git-dch.sh
${
SNAPSHOT_TAG
}
${
RELEASE_MODE
}
${
SCRIPTS_DIR
}
/sfl-git-dch.sh
${
VERSION
}
${
RELEASE_MODE
}
if
[
"
$?
"
-ne
"0"
]
;
then
if
[
"
$?
"
-ne
"0"
]
;
then
echo
"!! Cannot update debian changelogs"
echo
"!! Cannot update debian changelogs"
...
@@ -241,12 +246,9 @@ if [ ${DO_PREPARE} ]; then
...
@@ -241,12 +246,9 @@ if [ ${DO_PREPARE} ]; then
fi
fi
echo
" Doing commit"
echo
" Doing commit"
VERSION_COMMIT
=
${
VERSION
}${
VERSION_APPEND
}
if
[
!
${
RELEASE_MODE
}
]
;
then
VERSION_COMMIT
=
"
${
VERSION
}
-
${
SNAPSHOT_TAG
}
"
fi
cd
${
REPOSITORY_DIR
}
cd
${
REPOSITORY_DIR
}
git commit
-m
"[#1262] Updated debian changelogs (
${
VERSION
_COMMIT
}
)"
.
>
/dev/null
git commit
-m
"[#1262] Updated debian changelogs (
${
VERSION
}
)"
.
>
/dev/null
echo
" Pushing commit"
echo
" Pushing commit"
git push origin master
>
/dev/null
git push origin master
>
/dev/null
...
@@ -271,10 +273,10 @@ if [ ${DO_PREPARE} ]; then
...
@@ -271,10 +273,10 @@ if [ ${DO_PREPARE} ]; then
fi
fi
echo
"Write version numbers for following processes"
echo
"Write version numbers for following processes"
echo
"
${
VERSION
_COMMIT
}
"
>
${
REPOSITORY_DIR
}
/sflphone-common/VERSION
echo
"
${
VERSION
}
"
>
${
REPOSITORY_DIR
}
/sflphone-common/VERSION
echo
"
${
VERSION
_COMMIT
}
"
>
${
REPOSITORY_DIR
}
/sflphone-client-gnome/VERSION
echo
"
${
VERSION
}
"
>
${
REPOSITORY_DIR
}
/sflphone-client-gnome/VERSION
echo
"
${
VERSION
_COMMIT
}
"
>
${
REPOSITORY_DIR
}
/sflphone-client-kde/VERSION
echo
"
${
VERSION
}
"
>
${
REPOSITORY_DIR
}
/sflphone-client-kde/VERSION
echo
"
${
VERSION
_COMMIT
}
"
>
${
TODEPLOY_BUILD_DIR
}
/VERSION
echo
"
${
VERSION
}
"
>
${
TODEPLOY_BUILD_DIR
}
/VERSION
echo
"Archiving repository"
echo
"Archiving repository"
tar
czf
${
REPOSITORY_ARCHIVE
}
--exclude
.git
-C
`
dirname
${
REPOSITORY_DIR
}
`
sflphone
tar
czf
${
REPOSITORY_ARCHIVE
}
--exclude
.git
-C
`
dirname
${
REPOSITORY_DIR
}
`
sflphone
...
...
This diff is collapsed.
Click to expand it.
tools/build-system/sfl-git-dch.sh
+
5
−
27
View file @
7f2ef061
...
@@ -7,12 +7,12 @@
...
@@ -7,12 +7,12 @@
# Author: Julien Bonjean (julien@bonjean.info)
# Author: Julien Bonjean (julien@bonjean.info)
#
#
# Creation Date: 2009-05-13
# Creation Date: 2009-05-13
# Last Modified: 2009-05-28 18:
0
4:
12
-0400
# Last Modified: 2009-05-28 18:
2
4:
53
-0400
#####################################################
#####################################################
# set -x
# set -x
SNAPSHOT_TAG
=
$1
VERSION
=
$1
RELEASE_MODE
=
$2
RELEASE_MODE
=
$2
ROOT_DIR
=
"/home/projects/sflphone"
ROOT_DIR
=
"/home/projects/sflphone"
...
@@ -83,28 +83,6 @@ if [ "$?" -ne "0" ]; then
...
@@ -83,28 +83,6 @@ if [ "$?" -ne "0" ]; then
exit
-1
exit
-1
fi
fi
# get version
SOFTWARE_VERSION
=
`
echo
${
LAST_RELEASE_TAG_NAME
}
|
cut
-d
"/"
-f2-
|
cut
-d
"-"
-f1
`
if
[
"
$?
"
-ne
"0"
]
;
then
echo
" !! Error when retrieving software version"
exit
-1
fi
# add version info
SOFTWARE_VERSION_APPEND
=
if
[
${
RELEASE_MODE
}
]
then
if
[
"
${
RELEASE_MODE
}
"
!=
"release"
]
;
then
SOFTWARE_VERSION_APPEND
=
"~
${
RELEASE_MODE
}
"
fi
else
SOFTWARE_VERSION_APPEND
=
"~snapshot
${
SNAPSHOT_TAG
}
"
fi
# iterate throw changelog files
# iterate throw changelog files
for
CHANGELOG_FILE
in
${
CHANGELOG_FILES
[@]
}
for
CHANGELOG_FILE
in
${
CHANGELOG_FILES
[@]
}
do
do
...
@@ -141,7 +119,7 @@ do
...
@@ -141,7 +119,7 @@ do
if
[
${
IS_FIRST
}
]
if
[
${
IS_FIRST
}
]
then
then
yes
| dch
--changelog
${
CHANGELOG_FILE
}
-b
--allow-lower-version
--no-auto-nmu
--distribution
SYSTEM
--newversion
${
SOFTWARE_VERSION
}${
SOFTWARE_VERSION_APPEND
}
-SYSVER
"
$line
"
>
/dev/null 2>&1
yes
| dch
--changelog
${
CHANGELOG_FILE
}
-b
--allow-lower-version
--no-auto-nmu
--distribution
SYSTEM
--newversion
${
VERSION
}
-SYSVER
"
$line
"
>
/dev/null 2>&1
if
[
"
$?
"
-ne
"0"
]
;
then
if
[
"
$?
"
-ne
"0"
]
;
then
echo
echo
...
@@ -164,13 +142,13 @@ do
...
@@ -164,13 +142,13 @@ do
# add snapshot or release flag if needed
# add snapshot or release flag if needed
echo
echo
if
[
${
RELEASE_MODE
}
]
;
then
if
[
${
RELEASE_MODE
}
]
;
then
sed
-i
"3i
\
**
${
SOFTWARE_VERSION
}
${
RELEASE_MODE
}
**
\n
"
${
CHANGELOG_FILE
}
sed
-i
"3i
\
**
${
VERSION
}
**
\n
"
${
CHANGELOG_FILE
}
if
[
"
$?
"
-ne
"0"
]
;
then
if
[
"
$?
"
-ne
"0"
]
;
then
echo
" !! Error when adding snapshot flag"
echo
" !! Error when adding snapshot flag"
exit
-1
exit
-1
fi
fi
else
else
sed
-i
"3i
\
** SNAPSHOT
${
SNAPSHOT_TAG
}
**
\n
"
${
CHANGELOG_FILE
}
sed
-i
"3i
\
** SNAPSHOT
${
VERSION
}
**
\n
"
${
CHANGELOG_FILE
}
if
[
"
$?
"
-ne
"0"
]
;
then
if
[
"
$?
"
-ne
"0"
]
;
then
echo
" !! Error when adding snapshot flag"
echo
" !! Error when adding snapshot flag"
exit
-1
exit
-1
...
...
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