Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-build-utils
Project
Project
Details
Activity
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
korinf
etersoft-build-utils
Commits
0c8bafc3
Commit
0c8bafc3
authored
Feb 07, 2015
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
introduce get_default_txtrelease instead RELEASEPREFIX from config
parent
3c8de5d5
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
7 deletions
+24
-7
alt
share/eterbuild/functions/alt
+7
-4
config
share/eterbuild/functions/config
+0
-1
spec
share/eterbuild/functions/spec
+8
-2
get_release.sh
tests/get_release.sh
+9
-0
No files found.
share/eterbuild/functions/alt
View file @
0c8bafc3
...
@@ -98,12 +98,15 @@ get_altdistr_mod()
...
@@ -98,12 +98,15 @@ get_altdistr_mod()
# Проверяем, соответствует ли релиз пакетов указанному в MENV
# Проверяем, соответствует ли релиз пакетов указанному в MENV
pkg_release_check
()
pkg_release_check
()
{
{
local
STREL
=
$RELEASEPREFIX
# assert MENV
local
STREL
=
$(
get_default_txtrelease
)
local
STRELDEF
=
alt
# FIXME: do we need it?
[
-z
"
$KORINFTARGETRELEASE
"
]
||
STREL
=
$KORINFTARGETRELEASE
[
-z
"
$KORINFTARGETRELEASE
"
]
||
STREL
=
$KORINFTARGETRELEASE
if
[
"
$MENV
"
=
"SS"
]
||
[
"
$MENV
"
=
"DD"
]
;
then
if
[
"
$MENV
"
=
"SS"
]
||
[
"
$MENV
"
=
"DD"
]
;
then
for
i
in
$@
;
do
for
i
in
$@
;
do
if
[
-z
"
${
i
/*
$STREL
[0-9].M[0-9][0-9]*/
}
"
]
;
then
if
[
-z
"
${
i
/*
$STREL
[0-9].M[0-9][0-9]*/
}
"
]
&&
[
-z
"
${
i
/*
$STRELDEF
[0-9].M[0-9][0-9]*/
}
"
]
;
then
# Значит не тот релиз
# Значит не тот релиз
fatal
"Incorrect release in
$i
package: was prepared for Sisyphus"
fatal
"Incorrect release in
$i
package: was prepared for Sisyphus"
fi
fi
...
@@ -111,9 +114,9 @@ pkg_release_check()
...
@@ -111,9 +114,9 @@ pkg_release_check()
return
return
fi
fi
for
i
in
$@
;
do
for
i
in
$@
;
do
if
[
-n
"
${
i
/*
$STREL
[0-9].
$MENV
*/
}
"
]
;
then
if
[
-n
"
${
i
/*
$STREL
[0-9].
$MENV
*/
}
"
]
&&
[
-n
"
${
i
/*
$STRELDEF
[0-9].
$MENV
*/
}
"
]
;
then
# Значит не тот релиз
# Значит не тот релиз
fatal
"Incorrect release in
$i
package: was prepared for
$MENV
"
fatal
"Incorrect release in
$i
package: was prepared for
$MENV
(wait for
$STREL
[0-9].
$MENV
)
"
fi
fi
done
done
}
}
...
...
share/eterbuild/functions/config
View file @
0c8bafc3
...
@@ -58,7 +58,6 @@ MENV=SS
...
@@ -58,7 +58,6 @@ MENV=SS
[
-n
"
$DEBUG
"
]
&&
HASHERARG
=
"-v
$HASHERARG
"
[
-n
"
$DEBUG
"
]
&&
HASHERARG
=
"-v
$HASHERARG
"
#SSH_KEYFILE=~/.ssh/id_dsa
#SSH_KEYFILE=~/.ssh/id_dsa
RELEASEPREFIX
=
alt
GIRARHOST
=
git.alt
GIRARHOST
=
git.alt
GIRARURL
=
"http://git.altlinux.org"
GIRARURL
=
"http://git.altlinux.org"
...
...
share/eterbuild/functions/spec
View file @
0c8bafc3
...
@@ -59,10 +59,16 @@ get_numrelease()
...
@@ -59,10 +59,16 @@ get_numrelease()
get_release
"
$1
"
|
sed
-e
"s|
\(
[a-zA-Z]*
\)\(
[0-9
\.
]
\)
[^0-9
\.
]*|
\2
|"
||
echo
"0"
get_release
"
$1
"
|
sed
-e
"s|
\(
[a-zA-Z]*
\)\(
[0-9
\.
]
\)
[^0-9
\.
]*|
\2
|"
||
echo
"0"
}
}
get_default_txtrelease
()
{
# assert GIRARHOST
echo
${
GIRARHOST
/git./
}
}
# get alt from alt11
# get alt from alt11
get_txtrelease
()
get_txtrelease
()
{
{
get_release
"
$1
"
|
sed
-e
"s|
\(
[a-zA-Z]*
\)\(
[0-9
\.
]
\)
.*|
\1
|"
||
echo
"
$RELEASEPREFIX
"
get_release
"
$1
"
|
sed
-e
"s|
\(
[a-zA-Z]*
\)\(
[0-9
\.
]
\)
.*|
\1
|"
||
get_default_txtrelease
}
}
set_var
()
set_var
()
...
@@ -73,7 +79,7 @@ set_var()
...
@@ -73,7 +79,7 @@ set_var()
set_release
()
set_release
()
{
{
local
RELEASE
=
$2
local
RELEASE
=
$2
[
-n
"
$RELEASE
"
]
||
RELEASE
=
"
$
{
RELEASEPREFIX
}
1"
[
-n
"
$RELEASE
"
]
||
RELEASE
=
"
$
(
get_default_txtrelease
)
1"
set_var
$1
Release
$RELEASE
set_var
$1
Release
$RELEASE
}
}
...
...
tests/get_release.sh
View file @
0c8bafc3
...
@@ -80,6 +80,15 @@ check get_numpartrelease 3 `get_numpartrelease $TESTREL`
...
@@ -80,6 +80,15 @@ check get_numpartrelease 3 `get_numpartrelease $TESTREL`
TESTREL
=
eter26.svn724archlinux
TESTREL
=
eter26.svn724archlinux
check get_numpartrelease 26
`
get_numpartrelease
$TESTREL
`
check get_numpartrelease 26
`
get_numpartrelease
$TESTREL
`
GIRARHOST
=
git.alt
check get_default_txtrelease alt
`
get_default_txtrelease
`
GIRARHOST
=
git.eter
check get_default_txtrelease eter
`
get_default_txtrelease
`
GIRARHOST
=
giteter
check get_default_txtrelease eter
`
get_default_txtrelease
`
BASERELEASE
=
27.5
BASERELEASE
=
27.5
get_mn_fromspec
get_mn_fromspec
check MAJOR 27
$MAJOR
check MAJOR 27
$MAJOR
...
...
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