Date: Monday, December 12, 2022 @ 01:48:35 Author: seblu Revision: 1358799
archrelease: copy trunk to community-x86_64 Added: scaleway-cli/repos/community-x86_64/0001-Disable-online-version-check.patch (from rev 1358798, scaleway-cli/trunk/0001-Disable-online-version-check.patch) scaleway-cli/repos/community-x86_64/PKGBUILD (from rev 1358798, scaleway-cli/trunk/PKGBUILD) Deleted: scaleway-cli/repos/community-x86_64/0001-Disable-online-version-check.patch scaleway-cli/repos/community-x86_64/PKGBUILD -----------------------------------------+ 0001-Disable-online-version-check.patch | 48 ++++----- PKGBUILD | 146 +++++++++++++++--------------- 2 files changed, 97 insertions(+), 97 deletions(-) Deleted: 0001-Disable-online-version-check.patch =================================================================== --- 0001-Disable-online-version-check.patch 2022-12-12 01:48:27 UTC (rev 1358798) +++ 0001-Disable-online-version-check.patch 2022-12-12 01:48:35 UTC (rev 1358799) @@ -1,24 +0,0 @@ -From 06d7914bd5da89335c95793a3bc1903675f7a3b8 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?S=C3=A9bastien=20Luttringer?= <se...@seblu.net> -Date: Sat, 8 Oct 2022 17:31:34 +0200 -Subject: [PATCH] Disable online version check - ---- - internal/core/build_info.go | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/internal/core/build_info.go b/internal/core/build_info.go -index c3f7799e..be80db7d 100644 ---- a/internal/core/build_info.go -+++ b/internal/core/build_info.go -@@ -57,6 +57,7 @@ func (b *BuildInfo) GetUserAgent() string { - } - - func (b *BuildInfo) checkVersion(ctx context.Context) { -+ return - if !b.IsRelease() || ExtractEnv(ctx, scwDisableCheckVersionEnv) == "true" { - ExtractLogger(ctx).Debug("skipping check version") - return --- -2.37.3 - Copied: scaleway-cli/repos/community-x86_64/0001-Disable-online-version-check.patch (from rev 1358798, scaleway-cli/trunk/0001-Disable-online-version-check.patch) =================================================================== --- 0001-Disable-online-version-check.patch (rev 0) +++ 0001-Disable-online-version-check.patch 2022-12-12 01:48:35 UTC (rev 1358799) @@ -0,0 +1,24 @@ +From 06d7914bd5da89335c95793a3bc1903675f7a3b8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?S=C3=A9bastien=20Luttringer?= <se...@seblu.net> +Date: Sat, 8 Oct 2022 17:31:34 +0200 +Subject: [PATCH] Disable online version check + +--- + internal/core/build_info.go | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/internal/core/build_info.go b/internal/core/build_info.go +index c3f7799e..be80db7d 100644 +--- a/internal/core/build_info.go ++++ b/internal/core/build_info.go +@@ -57,6 +57,7 @@ func (b *BuildInfo) GetUserAgent() string { + } + + func (b *BuildInfo) checkVersion(ctx context.Context) { ++ return + if !b.IsRelease() || ExtractEnv(ctx, scwDisableCheckVersionEnv) == "true" { + ExtractLogger(ctx).Debug("skipping check version") + return +-- +2.37.3 + Deleted: PKGBUILD =================================================================== --- PKGBUILD 2022-12-12 01:48:27 UTC (rev 1358798) +++ PKGBUILD 2022-12-12 01:48:35 UTC (rev 1358799) @@ -1,73 +0,0 @@ -# Maintainer: Sébastien Luttringer -# Contributor: Patrik Cyvoct <patrik at ptrk dot io> -# Contributor: Mikkel Oscar Lyderik <mikkeloscar at gmail dot com> - -pkgname=scaleway-cli -pkgver=2.6.2 -pkgrel=1 -pkgdesc='Command line interface for Scaleway Cloud' -arch=('x86_64') -url='https://www.scaleway.com/en/cli/' -license=('Apache') -depends=('glibc') -makedepends=('go' 'git') -source=("git+https://github.com/scaleway/scaleway-cli.git#tag=v$pkgver" - '0001-Disable-online-version-check.patch') -sha256sums=('SKIP' - '04ad12a62aa7e9e80707a809e8a800c4b706475fa86a461d99f6791df92b0d2c') - -prepare() { - cd $pkgname - # apply patch from the source array (should be a pacman feature) - local src - for src in "${source[@]}"; do - src="${src%%::*}" - src="${src##*/}" - [[ $src = *.patch ]] || continue - echo "Applying patch $src..." - patch -Np1 < "../$src" - done - # remove online check tests - rm -vf internal/core/build_info_test.go - : -} - -build() { - cd $pkgname - export CGO_CPPFLAGS="$CPPFLAGS" - export CGO_CFLAGS="$CFLAGS" - export CGO_CXXFLAGS="$CXXFLAGS" - export CGO_LDFLAGS="$LDFLAGS" - go build \ - -buildmode=pie \ - -trimpath \ - -mod=readonly \ - -modcacherw \ - -ldflags "-linkmode external -extldflags \"${LDFLAGS}\" -X main.Version=$pkgver-$pkgrel -X main.BuildDate=$(date -u '+%Y-%m-%dT%I:%M:%S%p')" \ - -o scw ./cmd/scw/main.go - PATH=. scw autocomplete script shell=zsh > zshcomp - PATH=. scw autocomplete script shell=bash > bashcomp -} - -check() { - cd $pkgname - export CGO_CPPFLAGS="$CPPFLAGS" - export CGO_CFLAGS="$CFLAGS" - export CGO_CXXFLAGS="$CXXFLAGS" - export CGO_LDFLAGS="$LDFLAGS" - go test ./... \ - -buildmode=pie \ - -trimpath \ - -mod=readonly \ - -modcacherw \ - -ldflags "-linkmode external -extldflags \"${LDFLAGS}\" -X main.Version=$pkgver-$pkgrel -X main.BuildDate=$(date -u '+%Y-%m-%dT%I:%M:%S%p')" -} - -package() { - cd $pkgname - install -Dm755 scw "$pkgdir"/usr/bin/scw - install -Dm644 bashcomp "$pkgdir"/usr/share/bash-completion/completions/scw - install -Dm644 zshcomp "$pkgdir"/usr/share/zsh/site-functions/_scw -} - -# vim:set ts=2 sw=2 ft=PKGBUILD et: Copied: scaleway-cli/repos/community-x86_64/PKGBUILD (from rev 1358798, scaleway-cli/trunk/PKGBUILD) =================================================================== --- PKGBUILD (rev 0) +++ PKGBUILD 2022-12-12 01:48:35 UTC (rev 1358799) @@ -0,0 +1,73 @@ +# Maintainer: Sébastien Luttringer +# Contributor: Patrik Cyvoct <patrik at ptrk dot io> +# Contributor: Mikkel Oscar Lyderik <mikkeloscar at gmail dot com> + +pkgname=scaleway-cli +pkgver=2.7.0 +pkgrel=1 +pkgdesc='Command line interface for Scaleway Cloud' +arch=('x86_64') +url='https://www.scaleway.com/en/cli/' +license=('Apache') +depends=('glibc') +makedepends=('go' 'git') +source=("git+https://github.com/scaleway/scaleway-cli.git#tag=v$pkgver" + '0001-Disable-online-version-check.patch') +sha256sums=('SKIP' + '04ad12a62aa7e9e80707a809e8a800c4b706475fa86a461d99f6791df92b0d2c') + +prepare() { + cd $pkgname + # apply patch from the source array (should be a pacman feature) + local src + for src in "${source[@]}"; do + src="${src%%::*}" + src="${src##*/}" + [[ $src = *.patch ]] || continue + echo "Applying patch $src..." + patch -Np1 < "../$src" + done + # remove online check tests + rm -vf internal/core/build_info_test.go + : +} + +build() { + cd $pkgname + export CGO_CPPFLAGS="$CPPFLAGS" + export CGO_CFLAGS="$CFLAGS" + export CGO_CXXFLAGS="$CXXFLAGS" + export CGO_LDFLAGS="$LDFLAGS" + go build \ + -buildmode=pie \ + -trimpath \ + -mod=readonly \ + -modcacherw \ + -ldflags "-linkmode external -extldflags \"${LDFLAGS}\" -X main.Version=$pkgver-$pkgrel -X main.BuildDate=$(date -u '+%Y-%m-%dT%I:%M:%S%p')" \ + -o scw ./cmd/scw/main.go + PATH=. scw autocomplete script shell=zsh > zshcomp + PATH=. scw autocomplete script shell=bash > bashcomp +} + +check() { + cd $pkgname + export CGO_CPPFLAGS="$CPPFLAGS" + export CGO_CFLAGS="$CFLAGS" + export CGO_CXXFLAGS="$CXXFLAGS" + export CGO_LDFLAGS="$LDFLAGS" + go test ./... \ + -buildmode=pie \ + -trimpath \ + -mod=readonly \ + -modcacherw \ + -ldflags "-linkmode external -extldflags \"${LDFLAGS}\" -X main.Version=$pkgver-$pkgrel -X main.BuildDate=$(date -u '+%Y-%m-%dT%I:%M:%S%p')" +} + +package() { + cd $pkgname + install -Dm755 scw "$pkgdir"/usr/bin/scw + install -Dm644 bashcomp "$pkgdir"/usr/share/bash-completion/completions/scw + install -Dm644 zshcomp "$pkgdir"/usr/share/zsh/site-functions/_scw +} + +# vim:set ts=2 sw=2 ft=PKGBUILD et: