Projects
Infrastructure
arcanist
update.sh
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File update.sh of Package arcanist
#!/bin/bash if [ ! -d "arcanist.git" ]; then git clone -b stable https://github.com/phacility/arcanist.git arcanist.git pushd arcanist.git else pushd arcanist.git git remote set-url origin https://github.com/phacility/arcanist.git git fetch origin git reset --hard origin/stable git clean -d -f -x fi git_short_version_hash=$(git rev-parse --short HEAD) git_full_version_hash=$(git rev-parse HEAD) commitepoch=$(git log HEAD^1..HEAD --oneline --format=%ct | head -n 1) commitdate=$(date +%Y%m%d --date @${commitepoch}) month_behind=$(date +%Y%m%d --date @$(( ${commitepoch} - ( 31 * 24 * 3600 ) ))) month_ahead=$(date +%Y%m%d --date @$(( ${commitepoch} + ( 31 * 24 * 3600 ) ))) popd if [ ! -d arcanist-${git_full_version_hash}.tar.gz ]; then rm -rf arcanist-*.tar.gz wget --content-disposition https://github.com/phacility/arcanist/archive/${git_full_version_hash}.tar.gz#/arcanist-${git_full_version_hash}.tar.gz fi sed -i -r \ -e "s/git_short_version_hash .*/git_short_version_hash ${git_short_version_hash}/g" \ -e "s/git_full_version_hash .*/git_full_version_hash ${git_full_version_hash}/g" \ -e "s/Version:(\s+)[0-9]+/Version:\1${commitdate}/g" \ -e "s/Requires:(\s+)arcanist\(libphutil\) >= [0-9]+/Requires:\1arcanist\(libphutil\) >= ${month_behind}/g" \ -e "s/Requires:(\s+)arcanist\(libphutil\) <= [0-9]+/Requires:\1arcanist\(libphutil\) <= ${month_ahead}/g" \ arcanist.spec rpmdev-bumpspec \ --new="${commitdate}.git${git_short_version_hash}" \ --comment "Promote Week #$(date +%V --date ${commitdate})" \ arcanist.spec rm -rf *.src.rpm osc ar osc build --no-verify CentOS_7 arcanist.spec && \ rm -rf review-arcanist/ arcanist-*.src.rpm && \ cp /var/tmp/build-root/CentOS_7-x86_64/home/abuild/rpmbuild/SRPMS/arcanist-*.src.rpm . && \ fedora-review --verbose -n arcanist
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.