From 205b5c89a8aaf5b6d3d27f20c3be183516adb5af Mon Sep 17 00:00:00 2001 From: abu usama Date: Thu, 11 Jan 2024 14:51:40 +0500 Subject: [PATCH 1/5] replaced ppa with gemfury as apt source --- .github/workflows/cd_gemfury.yaml | 55 ++++++++++++++++++++++++++++ .github/workflows/cd_ppa.yaml | 59 ------------------------------- ipinfo/build-all-platforms.sh | 4 ++- ipinfo/deb.sh | 26 ++++++++++++-- scripts/build-all-platforms.sh | 7 ++++ scripts/build-archive-all.sh | 35 +++++++++++++++--- 6 files changed, 118 insertions(+), 68 deletions(-) create mode 100644 .github/workflows/cd_gemfury.yaml delete mode 100644 .github/workflows/cd_ppa.yaml diff --git a/.github/workflows/cd_gemfury.yaml b/.github/workflows/cd_gemfury.yaml new file mode 100644 index 00000000..69397701 --- /dev/null +++ b/.github/workflows/cd_gemfury.yaml @@ -0,0 +1,55 @@ +# Build and release ipinfo cli to gemfury (apt) + +name: Release to Gemfury +on: + push: + tags: + - 'ipinfo-*' + +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup GO + uses: actions/setup-go@v3 + with: + go-version: '1.20' + + - name: Extract CLI Name and Version + run: | + # Get the tag name from the event payload + TAG_NAME=${{ github.ref_name }} + + # Use a regular expression to extract the CLI name and version + if [[ $TAG_NAME =~ ^([^-]+)-([^-]+)$ ]]; then + CLI_NAME="${BASH_REMATCH[1]}" + CLI_VERSION="${BASH_REMATCH[2]}" + + echo "CLI Name: $CLI_NAME" + echo "CLI Version: $CLI_VERSION" + + # Add to github env + echo "CLI_NAME=$CLI_NAME" >> $GITHUB_ENV + echo "CLI_VERSION=$CLI_VERSION" >> $GITHUB_ENV + else + echo "Invalid tag format: $TAG_NAME" + echo "Tag should be of format CLI-VSN. e.g. ipinfo-1.0.0" + exit 1 + fi + + - name: Build + run: ./scripts/build-archive-all.sh ${{ env.CLI_NAME }} ${{ env.CLI_VERSION }} true + + - name: Install dependencies + run: | + echo "deb [trusted=yes] https://apt.fury.io/cli/ * *" | sudo tee /etc/apt/sources.list.d/fury-cli.list + sudo apt-get update + sudo apt-get install -y fury-cli + + - name: Upload + run: | + fury push ./build/${{ env.CLI_NAME }}_${{ env.CLI_VERSION }}_linux_*.deb --api-token ${{ secrets.IPINFO_GEMFURY_PUSH_TOKEN }} diff --git a/.github/workflows/cd_ppa.yaml b/.github/workflows/cd_ppa.yaml deleted file mode 100644 index 2bed5b4a..00000000 --- a/.github/workflows/cd_ppa.yaml +++ /dev/null @@ -1,59 +0,0 @@ -# Build and release ipinfo cli to PPA - -name: Push to PPA -on: - push: - tags: - - 'ipinfo-*' - -jobs: - push: - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Extract CLI Name and Version - run: | - # Get the tag name from the event payload - TAG_NAME=${{ github.ref_name }} - - # Use a regular expression to extract the CLI name and version - if [[ $TAG_NAME =~ ^([^-]+)-([^-]+)$ ]]; then - CLI_NAME="${BASH_REMATCH[1]}" - CLI_VERSION="${BASH_REMATCH[2]}" - - echo "CLI Name: $CLI_NAME" - echo "CLI Version: $CLI_VERSION" - - # Add to github env - echo "CLI_NAME=$CLI_NAME" >> $GITHUB_ENV - echo "CLI_VERSION=$CLI_VERSION" >> $GITHUB_ENV - else - echo "Invalid tag format: $TAG_NAME" - echo "Tag should be of format CLI-VSN. e.g. ipinfo-1.0.0" - exit 1 - fi - - - name: Import GPG - uses: crazy-max/ghaction-import-gpg@v6 - with: - gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} - passphrase: ${{ secrets.GPG_PASSPHRASE }} - - - name: Install build dependencies - run: sudo apt install devscripts debhelper dh-golang dput - - - name: Build source package - run: debuild -us -uc -S -d - - - name: Sign source package - run: | - cd ./.. - debsign -k ${{ secrets.GPG_KEY_ID }} ipinfo_${{ env.CLI_VERSION }}.dsc ipinfo_${{ env.CLI_VERSION }}_source.changes - - - name: Push to Launchpad - run: | - cd ./.. - dput ppa:ipinfo/ppa ipinfo_${{ env.CLI_VERSION }}_source.changes diff --git a/ipinfo/build-all-platforms.sh b/ipinfo/build-all-platforms.sh index 4027191e..48cbdf1d 100755 --- a/ipinfo/build-all-platforms.sh +++ b/ipinfo/build-all-platforms.sh @@ -1,6 +1,7 @@ #!/bin/bash # Build binary for all platforms for version $1. +# Optional param LINUX_ONLY can be set to `true`, to build for linux only. set -e @@ -8,5 +9,6 @@ DIR=`dirname $0` ROOT=$DIR/.. VSN=$1 +LINUX_ONLY=$2 -$ROOT/scripts/build-all-platforms.sh "ipinfo" $VSN +$ROOT/scripts/build-all-platforms.sh "ipinfo" $VSN $LINUX_ONLY diff --git a/ipinfo/deb.sh b/ipinfo/deb.sh index 72c85041..95676d76 100755 --- a/ipinfo/deb.sh +++ b/ipinfo/deb.sh @@ -1,10 +1,30 @@ #!/bin/sh VSN=3.3.0 +DEFAULT_ARCH=amd64 -curl -LO https://github.com/ipinfo/cli/releases/download/ipinfo-${VSN}/ipinfo_${VSN}.deb -sudo dpkg -i ipinfo_${VSN}.deb -rm ipinfo_${VSN}.deb +ARCH=$(uname -m) +case $ARCH in + x86_64) + ARCH_NAME="amd64" + ;; + i386|i686) + ARCH_NAME="386" + ;; + aarch64) + ARCH_NAME="arm64" + ;; + armv7l) + ARCH_NAME="arm" + ;; + *) + ARCH_NAME=$DEFAULT_ARCH + ;; +esac + +curl -LO https://github.com/ipinfo/cli/releases/download/ipinfo-${VSN}/ipinfo_${VSN}_linux_${ARCH_NAME}.deb +sudo dpkg -i ipinfo_${VSN}_linux_${ARCH_NAME}.deb +rm ipinfo_${VSN}_linux_${ARCH_NAME}.deb echo echo 'You can now run `ipinfo`'. diff --git a/scripts/build-all-platforms.sh b/scripts/build-all-platforms.sh index 3af9d223..de4ce3a0 100755 --- a/scripts/build-all-platforms.sh +++ b/scripts/build-all-platforms.sh @@ -1,6 +1,7 @@ #!/bin/bash # Build binary for all platforms for cli $1 & version $2. +# Optional param LINUX_ONLY can be set to `true`, to build for linux only. set -e @@ -9,6 +10,7 @@ ROOT=$DIR/.. CLI=$1 VSN=$2 +LINUX_ONLY=$3 if [ -z "$CLI" ]; then echo "require cli as first parameter" 2>&1 @@ -54,6 +56,11 @@ do arch="${t#*_}" output="${CLI}_${VSN}_${os}_${arch}" + if [ "$LINUX_ONLY" == true ] && [ "$os" != "linux" ]; then + echo "skipping platform: ${os}_${arch}" + continue + fi + if [ "$os" == "windows" ] ; then output+=".exe" fi diff --git a/scripts/build-archive-all.sh b/scripts/build-archive-all.sh index f2ecc970..5b8d4907 100755 --- a/scripts/build-archive-all.sh +++ b/scripts/build-archive-all.sh @@ -1,6 +1,7 @@ #!/bin/bash # Builds cli $1 version $2 for all platforms and packages them for release. +# Optional param LINUX_ONLY can be set to `true`, to build for linux only. set -e @@ -9,6 +10,7 @@ ROOT=$DIR/.. CLI=$1 VSN=$2 +LINUX_ONLY=$3 if [ -z "$CLI" ]; then echo "require cli as first parameter" 2>&1 @@ -27,7 +29,7 @@ fi # build rm -f $ROOT/build/${CLI}_${VSN}* -$ROOT/${CLI}/build-all-platforms.sh "$VSN" +$ROOT/${CLI}/build-all-platforms.sh "$VSN" "$LINUX_ONLY" # archive cd $ROOT/build @@ -41,7 +43,30 @@ done cd .. # dist: debian -rm -rf $ROOT/${CLI}/dist/usr -mkdir -p $ROOT/${CLI}/dist/usr/local/bin -cp $ROOT/build/${CLI}_${VSN}_linux_amd64 $ROOT/${CLI}/dist/usr/local/bin/${CLI} -dpkg-deb -Zgzip --build ${ROOT}/${CLI}/dist build/${CLI}_${VSN}.deb +declare -A debian_archs +debian_archs[linux_386]="i386" +debian_archs[linux_amd64]="amd64" +debian_archs[linux_arm]="armhf" +debian_archs[linux_arm64]="arm64" +for t in \ + linux_386 \ + linux_amd64 \ + linux_arm \ + linux_arm64; +do + os="${t%_*}" + arch="${t#*_}" + debian_arch="${debian_archs[$t]}" + output="${CLI}_${VSN}_${os}_${arch}" + + # Update Version and Architecture in the control file + sed -i "s/Version: .*/Version: $VSN/" "${ROOT}/${CLI}/dist/DEBIAN/control" + sed -i "s/Architecture: .*/Architecture: $debian_arch/" "${ROOT}/${CLI}/dist/DEBIAN/control" + + rm -rf "$ROOT/${CLI}/dist/usr" + mkdir -p "$ROOT/${CLI}/dist/usr/local/bin" + cp "$ROOT/build/${CLI}_${VSN}_${os}_${arch}" "$ROOT/${CLI}/dist/usr/local/bin/${CLI}" + dpkg-deb -Zgzip --build "${ROOT}/${CLI}/dist" "build/${output}.deb" +done + +wait From 61c540a25dc3e1429597db1a190a83e9a0865947 Mon Sep 17 00:00:00 2001 From: abu usama Date: Thu, 11 Jan 2024 14:53:06 +0500 Subject: [PATCH 2/5] updated cli install convenience scripts --- cidr2ip/deb.sh | 26 +++++++++++++++++++++++--- cidr2range/deb.sh | 25 ++++++++++++++++++++++--- grepdomain/deb.sh | 25 ++++++++++++++++++++++--- grepip/deb.sh | 25 ++++++++++++++++++++++--- matchip/deb.sh | 25 ++++++++++++++++++++++--- prips/deb.sh | 25 ++++++++++++++++++++++--- randip/deb.sh | 25 ++++++++++++++++++++++--- range2cidr/deb.sh | 25 ++++++++++++++++++++++--- range2ip/deb.sh | 25 ++++++++++++++++++++++--- splitcidr/deb.sh | 25 ++++++++++++++++++++++--- 10 files changed, 221 insertions(+), 30 deletions(-) diff --git a/cidr2ip/deb.sh b/cidr2ip/deb.sh index 11dc7f0e..80527892 100755 --- a/cidr2ip/deb.sh +++ b/cidr2ip/deb.sh @@ -1,10 +1,30 @@ #!/bin/sh VSN=1.0.0 +DEFAULT_ARCH=amd64 -curl -LO https://github.com/ipinfo/cli/releases/download/cidr2ip-${VSN}/cidr2ip_${VSN}.deb -sudo dpkg -i cidr2ip_${VSN}.deb -rm cidr2ip_${VSN}.deb +ARCH=$(uname -m) +case $ARCH in + x86_64) + ARCH_NAME="amd64" + ;; + i386|i686) + ARCH_NAME="386" + ;; + aarch64) + ARCH_NAME="arm64" + ;; + armv7l) + ARCH_NAME="arm" + ;; + *) + ARCH_NAME=$DEFAULT_ARCH + ;; +esac + +curl -LO https://github.com/ipinfo/cli/releases/download/cidr2ip-${VSN}/cidr2ip_${VSN}_linux_${ARCH_NAME}.deb +sudo dpkg -i cidr2ip_${VSN}_linux_${ARCH_NAME}.deb +rm cidr2ip_${VSN}_linux_${ARCH_NAME}.deb echo echo 'You can now run `cidr2ip`'. diff --git a/cidr2range/deb.sh b/cidr2range/deb.sh index f603f6fa..01b87450 100755 --- a/cidr2range/deb.sh +++ b/cidr2range/deb.sh @@ -1,10 +1,29 @@ #!/bin/sh VSN=1.2.0 +DEFAULT_ARCH=amd64 -curl -LO https://github.com/ipinfo/cli/releases/download/cidr2range-${VSN}/cidr2range_${VSN}.deb -sudo dpkg -i cidr2range_${VSN}.deb -rm cidr2range_${VSN}.deb +ARCH=$(uname -m) +case $ARCH in + x86_64) + ARCH_NAME="amd64" + ;; + i386|i686) + ARCH_NAME="386" + ;; + aarch64) + ARCH_NAME="arm64" + ;; + armv7l) + ARCH_NAME="arm" + ;; + *) + ARCH_NAME=$DEFAULT_ARCH + ;; +esac +curl -LO https://github.com/ipinfo/cli/releases/download/cidr2range-${VSN}/cidr2range_${VSN}_linux_${ARCH_NAME}.deb +sudo dpkg -i cidr2range_${VSN}_linux_${ARCH_NAME}.deb +rm cidr2range_${VSN}_linux_${ARCH_NAME}.deb echo echo 'You can now run `cidr2range`'. diff --git a/grepdomain/deb.sh b/grepdomain/deb.sh index c5e87698..39ee8121 100755 --- a/grepdomain/deb.sh +++ b/grepdomain/deb.sh @@ -1,10 +1,29 @@ #!/bin/sh VSN=1.0.0 +DEFAULT_ARCH=amd64 -curl -LO https://github.com/ipinfo/cli/releases/download/grepdomain-${VSN}/grepdomain_${VSN}.deb -sudo dpkg -i grepdomain_${VSN}.deb -rm grepdomain_${VSN}.deb +ARCH=$(uname -m) +case $ARCH in + x86_64) + ARCH_NAME="amd64" + ;; + i386|i686) + ARCH_NAME="386" + ;; + aarch64) + ARCH_NAME="arm64" + ;; + armv7l) + ARCH_NAME="arm" + ;; + *) + ARCH_NAME=$DEFAULT_ARCH + ;; +esac +curl -LO https://github.com/ipinfo/cli/releases/download/grepdomain-${VSN}/grepdomain_${VSN}_linux_${ARCH_NAME}.deb +sudo dpkg -i grepdomain_${VSN}_linux_${ARCH_NAME}.deb +rm grepdomain_${VSN}_linux_${ARCH_NAME}.deb echo echo 'You can now run `grepdomain`'. diff --git a/grepip/deb.sh b/grepip/deb.sh index 3028fdc6..4da5d4ac 100755 --- a/grepip/deb.sh +++ b/grepip/deb.sh @@ -1,10 +1,29 @@ #!/bin/sh VSN=1.2.3 +DEFAULT_ARCH=amd64 -curl -LO https://github.com/ipinfo/cli/releases/download/grepip-${VSN}/grepip_${VSN}.deb -sudo dpkg -i grepip_${VSN}.deb -rm grepip_${VSN}.deb +ARCH=$(uname -m) +case $ARCH in + x86_64) + ARCH_NAME="amd64" + ;; + i386|i686) + ARCH_NAME="386" + ;; + aarch64) + ARCH_NAME="arm64" + ;; + armv7l) + ARCH_NAME="arm" + ;; + *) + ARCH_NAME=$DEFAULT_ARCH + ;; +esac +curl -LO https://github.com/ipinfo/cli/releases/download/grepip-${VSN}/grepip_${VSN}_linux_${ARCH_NAME}.deb +sudo dpkg -i grepip_${VSN}_linux_${ARCH_NAME}.deb +rm grepip_${VSN}_linux_${ARCH_NAME}.deb echo echo 'You can now run `grepip`'. diff --git a/matchip/deb.sh b/matchip/deb.sh index 182662f1..5920a31d 100755 --- a/matchip/deb.sh +++ b/matchip/deb.sh @@ -1,10 +1,29 @@ #!/bin/sh VSN=1.0.0 +DEFAULT_ARCH=amd64 -curl -LO https://github.com/ipinfo/cli/releases/download/matchip-${VSN}/matchip${VSN}.deb -sudo dpkg -i matchip_${VSN}.deb -rm matchip_${VSN}.deb +ARCH=$(uname -m) +case $ARCH in + x86_64) + ARCH_NAME="amd64" + ;; + i386|i686) + ARCH_NAME="386" + ;; + aarch64) + ARCH_NAME="arm64" + ;; + armv7l) + ARCH_NAME="arm" + ;; + *) + ARCH_NAME=$DEFAULT_ARCH + ;; +esac +curl -LO https://github.com/ipinfo/cli/releases/download/matchip-${VSN}/matchip_${VSN}_linux_${ARCH_NAME}.deb +sudo dpkg -i matchip_${VSN}_linux_${ARCH_NAME}.deb +rm matchip_${VSN}_linux_${ARCH_NAME}.deb echo echo 'You can now run `matchip`'. diff --git a/prips/deb.sh b/prips/deb.sh index 77d3fa6d..ef931706 100755 --- a/prips/deb.sh +++ b/prips/deb.sh @@ -1,10 +1,29 @@ #!/bin/sh VSN=1.0.0 +DEFAULT_ARCH=amd64 -curl -LO https://github.com/ipinfo/cli/releases/download/prips-${VSN}/prips_${VSN}.deb -sudo dpkg -i prips_${VSN}.deb -rm prips_${VSN}.deb +ARCH=$(uname -m) +case $ARCH in + x86_64) + ARCH_NAME="amd64" + ;; + i386|i686) + ARCH_NAME="386" + ;; + aarch64) + ARCH_NAME="arm64" + ;; + armv7l) + ARCH_NAME="arm" + ;; + *) + ARCH_NAME=$DEFAULT_ARCH + ;; +esac +curl -LO https://github.com/ipinfo/cli/releases/download/prips-${VSN}/prips_${VSN}_linux_${ARCH_NAME}.deb +sudo dpkg -i prips_${VSN}_linux_${ARCH_NAME}.deb +rm prips_${VSN}_linux_${ARCH_NAME}.deb echo echo 'You can now run `prips`'. diff --git a/randip/deb.sh b/randip/deb.sh index 6b69d2d0..ef74a235 100755 --- a/randip/deb.sh +++ b/randip/deb.sh @@ -1,10 +1,29 @@ #!/bin/sh VSN=1.1.0 +DEFAULT_ARCH=amd64 -curl -LO https://github.com/ipinfo/cli/releases/download/randip-${VSN}/randip_${VSN}.deb -sudo dpkg -i randip_${VSN}.deb -rm randip_${VSN}.deb +ARCH=$(uname -m) +case $ARCH in + x86_64) + ARCH_NAME="amd64" + ;; + i386|i686) + ARCH_NAME="386" + ;; + aarch64) + ARCH_NAME="arm64" + ;; + armv7l) + ARCH_NAME="arm" + ;; + *) + ARCH_NAME=$DEFAULT_ARCH + ;; +esac +curl -LO https://github.com/ipinfo/cli/releases/download/randip-${VSN}/randip_${VSN}_linux_${ARCH_NAME}.deb +sudo dpkg -i randip_${VSN}_linux_${ARCH_NAME}.deb +rm randip_${VSN}_linux_${ARCH_NAME}.deb echo echo 'You can now run `randip`'. diff --git a/range2cidr/deb.sh b/range2cidr/deb.sh index cdd369de..b4d797b3 100755 --- a/range2cidr/deb.sh +++ b/range2cidr/deb.sh @@ -1,10 +1,29 @@ #!/bin/sh VSN=1.3.0 +DEFAULT_ARCH=amd64 -curl -LO https://github.com/ipinfo/cli/releases/download/range2cidr-${VSN}/range2cidr_${VSN}.deb -sudo dpkg -i range2cidr_${VSN}.deb -rm range2cidr_${VSN}.deb +ARCH=$(uname -m) +case $ARCH in + x86_64) + ARCH_NAME="amd64" + ;; + i386|i686) + ARCH_NAME="386" + ;; + aarch64) + ARCH_NAME="arm64" + ;; + armv7l) + ARCH_NAME="arm" + ;; + *) + ARCH_NAME=$DEFAULT_ARCH + ;; +esac +curl -LO https://github.com/ipinfo/cli/releases/download/range2cidr-${VSN}/range2cidr_${VSN}_linux_${ARCH_NAME}.deb +sudo dpkg -i range2cidr_${VSN}_linux_${ARCH_NAME}.deb +rm range2cidr_${VSN}_linux_${ARCH_NAME}.deb echo echo 'You can now run `range2cidr`'. diff --git a/range2ip/deb.sh b/range2ip/deb.sh index 36cab0fa..12286e53 100755 --- a/range2ip/deb.sh +++ b/range2ip/deb.sh @@ -1,10 +1,29 @@ #!/bin/sh VSN=1.0.0 +DEFAULT_ARCH=amd64 -curl -LO https://github.com/ipinfo/cli/releases/download/range2ip-${VSN}/range2ip_${VSN}.deb -sudo dpkg -i range2ip_${VSN}.deb -rm range2ip_${VSN}.deb +ARCH=$(uname -m) +case $ARCH in + x86_64) + ARCH_NAME="amd64" + ;; + i386|i686) + ARCH_NAME="386" + ;; + aarch64) + ARCH_NAME="arm64" + ;; + armv7l) + ARCH_NAME="arm" + ;; + *) + ARCH_NAME=$DEFAULT_ARCH + ;; +esac +curl -LO https://github.com/ipinfo/cli/releases/download/range2ip-${VSN}/range2ip_${VSN}_linux_${ARCH_NAME}.deb +sudo dpkg -i range2ip_${VSN}_linux_${ARCH_NAME}.deb +rm range2ip_${VSN}_linux_${ARCH_NAME}.deb echo echo 'You can now run `range2ip`'. diff --git a/splitcidr/deb.sh b/splitcidr/deb.sh index 9451dac1..a71fae94 100755 --- a/splitcidr/deb.sh +++ b/splitcidr/deb.sh @@ -1,10 +1,29 @@ #!/bin/sh VSN=1.0.0 +DEFAULT_ARCH=amd64 -curl -LO https://github.com/ipinfo/cli/releases/download/splitcidr-${VSN}/splitcidr_${VSN}.deb -sudo dpkg -i splitcidr_${VSN}.deb -rm splitcidr_${VSN}.deb +ARCH=$(uname -m) +case $ARCH in + x86_64) + ARCH_NAME="amd64" + ;; + i386|i686) + ARCH_NAME="386" + ;; + aarch64) + ARCH_NAME="arm64" + ;; + armv7l) + ARCH_NAME="arm" + ;; + *) + ARCH_NAME=$DEFAULT_ARCH + ;; +esac +curl -LO https://github.com/ipinfo/cli/releases/download/splitcidr-${VSN}/splitcidr_${VSN}_linux_${ARCH_NAME}.deb +sudo dpkg -i splitcidr_${VSN}_linux_${ARCH_NAME}.deb +rm splitcidr_${VSN}_linux_${ARCH_NAME}.deb echo echo 'You can now run `splitcidr`'. From 921c847b5c78d41922f13f90ca3646ce80647c5d Mon Sep 17 00:00:00 2001 From: abu usama Date: Thu, 11 Jan 2024 14:53:32 +0500 Subject: [PATCH 3/5] rm debian dir (not needed) --- debian/changelog | 5 ----- debian/control | 16 ---------------- debian/copyright | 19 ------------------- debian/files | 1 - debian/rules | 3 --- debian/upstream/metadata | 5 ----- debian/watch | 5 ----- 7 files changed, 54 deletions(-) delete mode 100644 debian/changelog delete mode 100644 debian/control delete mode 100644 debian/copyright delete mode 100644 debian/files delete mode 100755 debian/rules delete mode 100644 debian/upstream/metadata delete mode 100644 debian/watch diff --git a/debian/changelog b/debian/changelog deleted file mode 100644 index ebf3ce83..00000000 --- a/debian/changelog +++ /dev/null @@ -1,5 +0,0 @@ -ipinfo (3.3.0) focal; urgency=medium - - * 3.3.0 release. - - -- usama Mon, 07 Aug 2023 12:36:18 +0500 diff --git a/debian/control b/debian/control deleted file mode 100644 index 7b57e36d..00000000 --- a/debian/control +++ /dev/null @@ -1,16 +0,0 @@ -Source: ipinfo -Standards-Version: 4.6.2 -Maintainer: IPinfo -Section: utils -Priority: optional -Build-Depends: debhelper-compat (= 12), - dh-golang, - golang-1.18 -Vcs-Git: https://github.com/ipinfo/cli -Vcs-browser: https://github.com/ipinfo/cli -Homepage: https://ipinfo.io -XS-Go-Import-Path: github.com/ipinfo/cli - -Package: ipinfo -Architecture: any -Description: This is the official CLI for the IPinfo IP Address API. diff --git a/debian/copyright b/debian/copyright deleted file mode 100644 index 74dd6635..00000000 --- a/debian/copyright +++ /dev/null @@ -1,19 +0,0 @@ -Files: * -Copyright: 2020 IPinfo -License: Apache-2.0 - -License: Apache-2.0 - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - . - http://www.apache.org/licenses/LICENSE-2.0 - . - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - . - On Debian systems, the complete text of the Apache version 2.0 license - can be found in "/usr/share/common-licenses/Apache-2.0". diff --git a/debian/files b/debian/files deleted file mode 100644 index dac3237c..00000000 --- a/debian/files +++ /dev/null @@ -1 +0,0 @@ -ipinfo_3.3.0_source.buildinfo utils optional diff --git a/debian/rules b/debian/rules deleted file mode 100755 index 6d3a03c1..00000000 --- a/debian/rules +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/make -f -%: - PATH=${PATH}:/usr/lib/go-1.18/bin dh $@ --builddirectory=_build --buildsystem=golang --with=golang diff --git a/debian/upstream/metadata b/debian/upstream/metadata deleted file mode 100644 index 60047cc3..00000000 --- a/debian/upstream/metadata +++ /dev/null @@ -1,5 +0,0 @@ ---- -Bug-Database: https://github.com/ipinfo/cli/issues -Bug-Submit: https://github.com/ipinfo/cli/issues/new -Repository: https://github.com/ipinfo/cli.git -Repository-Browse: https://github.com/ipinfo/cli diff --git a/debian/watch b/debian/watch deleted file mode 100644 index b4b8e3b5..00000000 --- a/debian/watch +++ /dev/null @@ -1,5 +0,0 @@ -version=4 -opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%golang-github-ipinfo-cli-$1.tar.gz%,\ - uversionmangle=s/(\d)[_\.\-\+]?(RC|rc|pre|dev|beta|alpha)[.]?(\d*)$/\$1~\$2\$3/,\ - dversionmangle=s/\+ds\d*$//,repacksuffix=+ds1" \ - https://github.com/ipinfo/cli/tags .*/v?(\d\S*)\.tar\.gz debian From 1df9e018d0e1f603f92b22dd3cbdd52150f00c90 Mon Sep 17 00:00:00 2001 From: abu usama Date: Thu, 11 Jan 2024 15:25:38 +0500 Subject: [PATCH 4/5] updated docs --- README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1354d0a5..37b8fba8 100644 --- a/README.md +++ b/README.md @@ -27,17 +27,17 @@ OR to install the latest `amd64` version without automatic updates: curl -Ls https://github.com/ipinfo/cli/releases/download/ipinfo-3.3.0/macos.sh | sh ``` -### Ubuntu PPA +### Ubuntu APT _Note_: this installs our full suite of binaries and keeps them up-to-date. ```bash -sudo add-apt-repository ppa:ipinfo/ppa +echo "deb [trusted=yes] https://apt.fury.io/ipinfo/ /" | sudo tee "/etc/apt/sources.list.d/ipinfo.fury.list" sudo apt update sudo apt install ipinfo ``` -### Debian / Ubuntu (amd64) +### Debian / Ubuntu _Note_: this is a one-time installation; updates are not automatic. Use the PPA for automatic updates. @@ -49,9 +49,10 @@ curl -Ls https://github.com/ipinfo/cli/releases/download/ipinfo-3.3.0/deb.sh | s OR ```bash -curl -LO https://github.com/ipinfo/cli/releases/download/ipinfo-3.3.0/ipinfo_3.3.0.deb -sudo dpkg -i ipinfo_3.3.0.deb +curl -LO https://github.com/ipinfo/cli/releases/download/ipinfo-3.3.0/ipinfo_3.3.0_linux_{arch}.deb +sudo dpkg -i ipinfo_3.3.0_linux_{arch}.deb ``` +where `{arch}` can be 386, amd64, arm, or arm64. ### FreeBSD @@ -147,7 +148,7 @@ curl -LO https://github.com/ipinfo/cli/releases/download/ipinfo-3.3.0/ipinfo_3.3 wget https://github.com/ipinfo/cli/releases/download/ipinfo-3.3.0/ipinfo_3.3.0_${PLAT}.tar.gz tar -xvf ipinfo_3.3.0_${PLAT}.tar.gz -mv ipinfo_3.3.0_${PLAT} /usr/local/bin/ipinfo +sudo mv ipinfo_3.3.0_${PLAT} /usr/local/bin/ipinfo ``` ### Using `git` From 8f0997ab18b05a29d0ffb33fa512ffae90bdf351 Mon Sep 17 00:00:00 2001 From: abu usama Date: Fri, 26 Jan 2024 16:56:09 +0500 Subject: [PATCH 5/5] added the custom domain --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 37b8fba8..25fa4084 100644 --- a/README.md +++ b/README.md @@ -27,12 +27,12 @@ OR to install the latest `amd64` version without automatic updates: curl -Ls https://github.com/ipinfo/cli/releases/download/ipinfo-3.3.0/macos.sh | sh ``` -### Ubuntu APT +### Ubuntu PPA _Note_: this installs our full suite of binaries and keeps them up-to-date. ```bash -echo "deb [trusted=yes] https://apt.fury.io/ipinfo/ /" | sudo tee "/etc/apt/sources.list.d/ipinfo.fury.list" +echo "deb [trusted=yes] https://ppa.ipinfo.net/ /" | sudo tee "/etc/apt/sources.list.d/ipinfo.ppa.list" sudo apt update sudo apt install ipinfo ``` @@ -52,6 +52,7 @@ OR curl -LO https://github.com/ipinfo/cli/releases/download/ipinfo-3.3.0/ipinfo_3.3.0_linux_{arch}.deb sudo dpkg -i ipinfo_3.3.0_linux_{arch}.deb ``` + where `{arch}` can be 386, amd64, arm, or arm64. ### FreeBSD