adapt vim-update.sh for Fedora 28 and adding check for bodhi enablement
This commit is contained in:
parent
3faef863c6
commit
fbda9b3cc2
@ -1,15 +1,17 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
debug=""
|
debug=""
|
||||||
#debug="echo "
|
#debug="echo "
|
||||||
branches=( "master" "f27" "f26" )
|
branches=( "master" "f28" "f27" "f26" )
|
||||||
releases=( "fc28" "fc27" "fc26" )
|
releases=( "fc29" "fc28" "fc27" "fc26" )
|
||||||
regexps=( "fc28" "\|fc27" "\|fc26" )
|
regexps=( "fc29" "\|fc28" "\|fc27" "\|fc26" )
|
||||||
|
bodhi_enabled=( "0" "0" "1" "1")
|
||||||
branches_count=4
|
branches_count=4
|
||||||
#releases_regexp=fc28\\\|fc27\\\|fc28
|
#releases_regexp=fc28\\\|fc27\\\|fc28
|
||||||
|
|
||||||
branches_index=0
|
branches_index=0
|
||||||
release_index=0
|
release_index=0
|
||||||
regexp_index=0
|
regexp_index=0
|
||||||
|
bodhi_enabled_index=0
|
||||||
done_build=0
|
done_build=0
|
||||||
releases_regexp="${regexps[@]: regexp_index: 1}"
|
releases_regexp="${regexps[@]: regexp_index: 1}"
|
||||||
let "regexp_index+=1"
|
let "regexp_index+=1"
|
||||||
@ -117,6 +119,7 @@ if [ $CHANGES -ne 0 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
let "release_index+=1"
|
let "release_index+=1"
|
||||||
|
let "bodhi_enabled_index+=1"
|
||||||
|
|
||||||
for branch in "${branches[@]:(1)}";
|
for branch in "${branches[@]:(1)}";
|
||||||
do
|
do
|
||||||
@ -144,19 +147,23 @@ if [ $CHANGES -ne 0 ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# append next release to regexp
|
# append next release to regexp - because we need to check if there aren't
|
||||||
|
# any testing updates from higher branches (lower branch cannot have
|
||||||
|
# bigger NVR than higher branch) in next iteration
|
||||||
releases_regexp="$releases_regexp${regexps[@]: regexp_index: 1}"
|
releases_regexp="$releases_regexp${regexps[@]: regexp_index: 1}"
|
||||||
|
|
||||||
# Check if release has pending or testing update - if not, build package
|
# Check if release has pending or testing update - if not, build package
|
||||||
# and submit update for testing
|
# and submit update for testing
|
||||||
#pending_update=`bodhi updates query --packages vim --status pending \
|
|
||||||
# | grep $releases_regexp`
|
# | grep $releases_regexp`
|
||||||
|
# done_build is checking, if previous branch did build - lower branch can do
|
||||||
|
# a build only when higher branch build was ok.
|
||||||
testing_update=`bodhi updates query --packages vim --status testing \
|
testing_update=`bodhi updates query --packages vim --status testing \
|
||||||
| grep $releases_regexp`
|
| grep $releases_regexp`
|
||||||
if [[ "$testing_update" == "" && $done_build -eq 1 ]]; then
|
if [[ "$testing_update" == "" && $done_build -eq 1 ]]; then
|
||||||
fedpkg build
|
fedpkg build
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
if [ $branch != "master" ]; then
|
# if branch isn't master or branch is enabled in bodhi, create update
|
||||||
|
if [ $branch != "master" || "${bodhi_enabled[@]: $bodhi_enabled_index: 1}"=="1" ]; then
|
||||||
bodhi updates new --user zdohnal --type enhancement --notes "The newest upstream commit" --request testing --autokarma --stable-karma 3 --unstable-karma -3 vim-${UPSTREAMMAJOR}.${LASTPLFILLED}-1.${releases[@]: $release_index: 1}
|
bodhi updates new --user zdohnal --type enhancement --notes "The newest upstream commit" --request testing --autokarma --stable-karma 3 --unstable-karma -3 vim-${UPSTREAMMAJOR}.${LASTPLFILLED}-1.${releases[@]: $release_index: 1}
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@ -167,10 +174,11 @@ if [ $CHANGES -ne 0 ]; then
|
|||||||
done_build=0
|
done_build=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Increment index and cut the head of releases_regexp string
|
# Increment index
|
||||||
let "branches_index+=1"
|
let "branches_index+=1"
|
||||||
let "release_index+=1"
|
let "release_index+=1"
|
||||||
let "regexp_index+=1"
|
let "regexp_index+=1"
|
||||||
|
let "bodhi_enabled_index+=1"
|
||||||
done
|
done
|
||||||
#$debug git push
|
#$debug git push
|
||||||
#if [ $? -eq 0 ]; then
|
#if [ $? -eq 0 ]; then
|
||||||
|
5
vim.spec
5
vim.spec
@ -24,7 +24,7 @@ Summary: The VIM editor
|
|||||||
URL: http://www.vim.org/
|
URL: http://www.vim.org/
|
||||||
Name: vim
|
Name: vim
|
||||||
Version: %{baseversion}.%{patchlevel}
|
Version: %{baseversion}.%{patchlevel}
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: Vim
|
License: Vim
|
||||||
Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{baseversion}-%{patchlevel}.tar.bz2
|
Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{baseversion}-%{patchlevel}.tar.bz2
|
||||||
Source1: vim.sh
|
Source1: vim.sh
|
||||||
@ -728,6 +728,9 @@ touch %{buildroot}/%{_datadir}/%{name}/vimfiles/doc/tags
|
|||||||
%{_datadir}/icons/locolor/*/apps/*
|
%{_datadir}/icons/locolor/*/apps/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Feb 21 2018 Zdenek Dohnal <zdohnal@redhat.com> - 8.0.1527-2
|
||||||
|
- adapt vim-update.sh for Fedora 28 and adding check for bodhi enablement
|
||||||
|
|
||||||
* Tue Feb 20 2018 Karsten Hopp <karsten@redhat.com> 8.0.1527-1
|
* Tue Feb 20 2018 Karsten Hopp <karsten@redhat.com> 8.0.1527-1
|
||||||
- patchlevel 1527
|
- patchlevel 1527
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user