-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:mersinvald/batch_resolve
- Loading branch information
Showing
3 changed files
with
53 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
SHELL=/bin/bash | ||
VERSION=$(grep "version" Cargo.toml | head -n 1 | grep -Eo "[0-9].[0-9].[0-9]") | ||
LICENSE="MIT" | ||
MAINTAINER="Mike Lubinets <[email protected]>" | ||
DESCRIPTION="Fast asynchronous DNS resolver" | ||
URL="https://github.com/mersinvald/batch_resolve" | ||
|
||
# Build statuc binary | ||
~/.bin/rust-musl-builder cargo build --release | ||
|
||
# Make temp release dir | ||
mkdir -p packaging/temp | ||
|
||
# Copy release into temp folder | ||
cp target/x86_64-unknown-linux-musl/release/batch_resolve packaging/temp | ||
|
||
cd packaging | ||
|
||
fpm -s dir -t deb --version "$VERSION" --description "$DESCRIPTION" --url "$URL" --name "batch_resolve" --maintainer "$MAINTAINER" temp/batch_resolve=/usr/bin/batch_resolve | ||
fpm -s dir -t rpm --version "$VERSION" --description "$DESCRIPTION" --url "$URL" --name "batch_resolve" --maintainer "$MAINTAINER" temp/batch_resolve=/usr/bin/batch_resolve | ||
|
||
rm -rf temp/ | ||
|
||
# Update aur package | ||
git clone ssh://[email protected]/batch_resolve.git || exit 1 | ||
cd batch_resolve | ||
pwd | ||
sed -i "s/pkgver=.*/pkgver=$VERSION/g" PKGBUILD | ||
|
||
HASH=$(makepkg -g) | ||
sed -i "/md5sums=.*/d" PKGBUILD | ||
echo $HASH >> PKGBUILD | ||
|
||
makepkg --printsrcinfo > .SRCINFO | ||
|
||
cat PKGBUILD | ||
|
||
git add PKGBUILD .SRCINFO && git commit -m "Version $VERSION" && git push | ||
|
||
cd .. | ||
rm -rf batch_resolve/ |