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
fe926bc8
Commit
fe926bc8
authored
May 13, 2010
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add test for prev release
parent
ceed8852
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
0 deletions
+57
-0
get_ver.spec
tests/get_ver.spec
+9
-0
test_prevprelease.sh
tests/test_prevprelease.sh
+48
-0
No files found.
tests/get_ver.spec
0 → 100644
View file @
fe926bc8
Name: get_version_test
Version: 2.1
Release: alt0
Summary: Test
Group: Other
License: Public License
%description
Get version test
tests/test_prevprelease.sh
0 → 100755
View file @
fe926bc8
#!/bin/sh
.
`
dirname
$0
`
/../share/eterbuild/functions/common
load_mod spec
SPECNAME
=
get_ver.spec
check
()
{
[
"
$2
"
!=
"
$3
"
]
&&
echo
"FATAL with '
$1
': result '
$3
' do not match with '
$2
'"
||
echo
"OK for '
$1
' with '
$2
'"
}
fill_spec
()
{
cat
<<
EOF
>
$SPECNAME
Name: get_version_test
Version: 2.1
Release:
$RELEASE
Summary: Test
Group: Other
License: Public License
%description
Get version test
EOF
}
check_prev
()
{
# from rpmbh:
# General rule: always alt(N-1).MM.(N)
RELEASE
=
"
$2
"
fill_spec
RELEASE
=
$(
get_release
$SPECNAME
)
test
-n
"
$RELEASE
"
||
fatal
"release missed"
BASERELEASE
=
$(
get_numrelease
$SPECNAME
)
test
-n
"
$BASERELEASE
"
||
fatal
"baserelease missed"
local
RES
=
"
$(
get_txtrelease
$SPECNAME
)$(
decrement_release
$BASERELEASE
)
.
$MDISTR
.
$BASERELEASE
"
check
"
$2
"
"
$1
"
"
$RES
"
}
MDISTR
=
M40
check_prev alt2.M40.3 alt3
check_prev alt2.M40.3.r201.2 alt3.r201.2
check_prev alt0.M40.1 alt1
check_prev alt0.M40.0 alt0
#rm -f $SPECNAME
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