Add script to automate update process
This commit is contained in:
parent
fc0a5142df
commit
cfe7537da6
1 changed files with 37 additions and 0 deletions
37
update-new-version.sh
Executable file
37
update-new-version.sh
Executable file
|
@ -0,0 +1,37 @@
|
|||
#!/bin/bash
|
||||
function main {
|
||||
local old=$1
|
||||
local new=$2
|
||||
local now=`date -R`
|
||||
local author=`git config --get user.name`
|
||||
local email=`git config --get user.email`
|
||||
local username=`git config --get remote.origin.url | sed 's,.*:\(.*\)/.*,\1,'`
|
||||
local tempfile=`tempfile`
|
||||
|
||||
git checkout -b version-$new
|
||||
|
||||
mv intellij-idea-community_{$old,$new}
|
||||
mv intellij-idea-community_{$old,$new}.orig.tar.gz
|
||||
|
||||
echo "intellij-idea-community ($new-1) yakkety; urgency=low
|
||||
|
||||
* Upstream Version $new
|
||||
|
||||
-- $author ($username) <$email> $now
|
||||
" >> $tempfile
|
||||
|
||||
cat intellij-idea-community_$new/debian/changelog >> $tempfile
|
||||
mv $tempfile intellij-idea-community_$new/debian/changelog
|
||||
|
||||
sed -i "s/$old/$new/g" intellij-idea-community_$new/debian/preinst
|
||||
|
||||
(cd intellij-idea-community_$new/ && debuild -us -uc )
|
||||
|
||||
rm intellij-idea-community_${old}*
|
||||
|
||||
sudo dpkg -i intellij-idea-community_$new-1_all.deb
|
||||
}
|
||||
|
||||
|
||||
|
||||
main $1 $2
|
Loading…
Reference in a new issue