-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add grep scripts and bump vsn to 1.0.0
- Loading branch information
1 parent
6ec900c
commit 9bf3c4e
Showing
9 changed files
with
117 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
|
||
# Build binary for all platforms for version $1. | ||
|
||
set -e | ||
|
||
DIR=`dirname $0` | ||
ROOT=$DIR/.. | ||
|
||
VSN=$1 | ||
|
||
if [ -z "$VSN" ]; then | ||
echo "require version as first parameter" 2>&1 | ||
exit 1 | ||
fi | ||
|
||
for t in \ | ||
darwin_amd64 \ | ||
dragonfly_amd64 \ | ||
freebsd_amd64 \ | ||
linux_amd64 \ | ||
netbsd_amd64 \ | ||
openbsd_amd64 \ | ||
plan9_amd64 \ | ||
solaris_amd64 \ | ||
windows_amd64 ; | ||
do | ||
os="${t%_*}" | ||
arch="${t#*_}" | ||
output="grepip_${VSN}_${os}_${arch}" | ||
|
||
if [ "$os" == "windows" ] ; then | ||
output+=".exe" | ||
fi | ||
|
||
GOOS=$os GOARCH=$arch go build \ | ||
-o $ROOT/build/${output} \ | ||
$ROOT/grepip & | ||
done | ||
|
||
wait |
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,10 @@ | ||
#!/bin/bash | ||
|
||
# Build local binary. | ||
|
||
DIR=`dirname $0` | ||
ROOT=$DIR/.. | ||
|
||
go build \ | ||
-o $ROOT/build/grepip \ | ||
$ROOT/grepip |
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 @@ | ||
usr/ |
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,11 @@ | ||
Source: grepip | ||
Section: utils | ||
Version: 1.0.0 | ||
Priority: optional | ||
Maintainer: IPinfo <[email protected]> | ||
Vcs-Git: https://github.com/ipinfo/cli | ||
Vcs-browser: https://github.com/ipinfo/cli | ||
Homepage: https://ipinfo.io | ||
Package: grepip | ||
Architecture: amd64 | ||
Description: A grep-like tool for filtering IPv4 and IPv6 addresses. |
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,44 @@ | ||
#!/bin/bash | ||
|
||
# Build and upload (to GitHub) for all platforms for version $1. | ||
|
||
set -e | ||
|
||
DIR=`dirname $0` | ||
ROOT=$DIR/.. | ||
|
||
VSN=$1 | ||
|
||
if [ -z "$VSN" ]; then | ||
echo "require version as first parameter" 2>&1 | ||
exit 1 | ||
fi | ||
|
||
# build | ||
rm -f $ROOT/build/grepip_${VSN}* | ||
$ROOT/grepip/build-all-platforms.sh "$VSN" | ||
|
||
# archive | ||
cd $ROOT/build | ||
for t in grepip_${VSN}_* ; do | ||
if [[ $t == grepip_*_windows_* ]]; then | ||
zip -q ${t/.exe/.zip} $t | ||
else | ||
tar -czf ${t}.tar.gz $t | ||
fi | ||
done | ||
cd .. | ||
|
||
# dist: debian | ||
rm -rf $ROOT/grepip/dist/usr | ||
mkdir -p $ROOT/grepip/dist/usr/local/bin | ||
cp $ROOT/build/grepip_${VSN}_linux_amd64 $ROOT/grepip/dist/usr/local/bin/grepip | ||
dpkg-deb --build ${ROOT}/grepip/dist build/grepip_${VSN}.deb | ||
|
||
# release | ||
gh release create $VSN \ | ||
-R ipinfo/cli \ | ||
-t "grepip-${VSN}" \ | ||
$ROOT/build/grepip_*.tar.gz \ | ||
$ROOT/build/grepip_*.zip \ | ||
$ROOT/build/grepip_*.deb |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Source: ipinfo | ||
Section: utils | ||
Version: 1.0-1 | ||
Version: 1.0.0 | ||
Priority: optional | ||
Maintainer: IPinfo <[email protected]> | ||
Vcs-Git: https://github.com/ipinfo/cli | ||
|
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