代码拉取完成,页面将自动刷新
#!/bin/bash
echo "# Getting branch info"
git status -bs
echo "# Press Return or Space to start build, all other keys to quit"
read -s -n 1 key
if [[ $key != "" ]]; then exit; fi
version=$(git describe --tag)
head=$(git rev-parse --short HEAD)
epoch=$(date +%s)
echo "# Building"
./build.sh
echo "# Cleaning up previous builds"
rm -rf build
rm *.tar.gz
rm *.deb
rm *.rpm
mkdir -p build/usr/bin
mkdir -p build/usr/share/replication-manager/dashboard
mkdir -p build/etc/replication-manager
mkdir -p build/etc/systemd/system
mkdir -p build/etc/init.d
mkdir -p build/var/lib/replication-manager
echo "# Copying files to build dir"
cp replication-manager build/usr/bin/
cp etc/config.toml.sample build/etc/replication-manager/config.toml.sample
cp -r dashboard/* build/usr/share/replication-manager/dashboard/
cp -r share/* build/usr/share/replication-manager/
cp service/replication-manager.service build/etc/systemd/system
cp service/replication-manager.init.el6 build/etc/init.d/replication-manager
chmod 755 build/etc/init.d/replication-manager
cp service/replication-manager-arbitrator.init.el6 build/etc/init.d/replication-manager-arbitrator
chmod 755 build/etc/init.d/replication-manager-arbitrator
echo "# Building packages"
fpm --epoch $epoch --iteration $head -v $version -C build -s dir -t rpm -n replication-manager .
fpm --package replication-manager-$version-$head.tar -C build -s dir -t tar -n replication-manager .
gzip replication-manager-$version-$head.tar
cp service/replication-manager.init.deb7 build/etc/init.d/replication-manager
fpm --epoch $epoch --iteration $head -v $version -C build -s dir -t deb -n replication-manager .
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。