From: tranzystorek-io <tranzystorek-io@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] transifex-cli: update to 1.3.0, disable self-updates
Date: Thu, 28 Jul 2022 16:53:19 +0200 [thread overview]
Message-ID: <20220728145319.gukdoFg0MvHXDPYYaLvULlfzN2HV2FsC5PhaJUvXk-E@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-38330@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 1285 bytes --]
There is an updated pull request by tranzystorek-io against master on the void-packages repository
https://github.com/tranzystorek-io/void-packages transifex-cli
https://github.com/void-linux/void-packages/pull/38330
transifex-cli: update to 1.3.0, disable self-updates
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/38330.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-transifex-cli-38330.patch --]
[-- Type: text/x-diff, Size: 4336 bytes --]
From 2b24eeb56e3591b4a64b653e36a42dfba7bbfd72 Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Thu, 28 Jul 2022 10:11:14 +0200
Subject: [PATCH 1/2] transifex-cli: update to 1.3.0
---
srcpkgs/transifex-cli/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/transifex-cli/template b/srcpkgs/transifex-cli/template
index 999b461c7c51..c8d753ad7226 100644
--- a/srcpkgs/transifex-cli/template
+++ b/srcpkgs/transifex-cli/template
@@ -1,6 +1,6 @@
# Template file for 'transifex-cli'
pkgname=transifex-cli
-version=1.2.1
+version=1.3.0
revision=1
wrksrc="cli-${version}"
build_style=go
@@ -12,7 +12,7 @@ license="Apache-2.0"
homepage="https://github.com/transifex/cli"
changelog="https://github.com/transifex/cli/releases"
distfiles="https://github.com/transifex/cli/archive/refs/tags/v${version}.tar.gz"
-checksum=f8a76381294cdd75872de5b69acf2781d912e3a7e5e870bc41f0ee358715a3be
+checksum=e1cbf24e4c0dcb08d3d13c543e36156b50d420e6cc6198f30fba354016f4fd32
post_install() {
mv ${DESTDIR}/usr/bin/{cli,transifex}
From c5b8b3820fd23d50d7a2f645bd082c01c8a260ad Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Thu, 28 Jul 2022 16:20:07 +0200
Subject: [PATCH 2/2] transifex-cli: disable self-updates
---
.../patches/disable-self-updates.patch | 98 +++++++++++++++++++
1 file changed, 98 insertions(+)
create mode 100644 srcpkgs/transifex-cli/patches/disable-self-updates.patch
diff --git a/srcpkgs/transifex-cli/patches/disable-self-updates.patch b/srcpkgs/transifex-cli/patches/disable-self-updates.patch
new file mode 100644
index 000000000000..14d266daae84
--- /dev/null
+++ b/srcpkgs/transifex-cli/patches/disable-self-updates.patch
@@ -0,0 +1,98 @@
+diff --git a/internal/txlib/update.go b/internal/txlib/update.go
+index 98b6f6d..463e801 100644
+--- a/internal/txlib/update.go
++++ b/internal/txlib/update.go
+@@ -2,12 +2,6 @@ package txlib
+
+ import (
+ "fmt"
+- "os"
+-
+- "github.com/blang/semver"
+- "github.com/fatih/color"
+- "github.com/manifoldco/promptui"
+- "github.com/rhysd/go-github-selfupdate/selfupdate"
+ )
+
+ type UpdateCommandArguments struct {
+@@ -18,79 +12,6 @@ type UpdateCommandArguments struct {
+ }
+
+ func UpdateCommand(arguments UpdateCommandArguments) error {
+- if arguments.Debug {
+- selfupdate.EnableLog()
+- }
+- // Gets the version from txlib
+- version := arguments.Version
+-
+- current, err := semver.Parse(version)
+- if err != nil {
+- return err
+- }
+-
+- latest, _, err := selfupdate.DetectLatest("transifex/cli")
+- if err != nil {
+- return err
+- }
+- if arguments.Check {
+- if current.GE(latest.Version) {
+- fmt.Println("Congratulations, you are up to date with v", version)
+- } else {
+- fmt.Printf(
+- "There is a new latest release for you"+
+- " v%s -> v%s", current, latest.Version.String(),
+- )
+- fmt.Println()
+- fmt.Println(
+- "Use `tx update` or `tx update --no-interactive` " +
+- "command to update to the latest version.")
+- fmt.Println("If you want to download and install it manually, " +
+- "you can get the asset from")
+- fmt.Println(latest.AssetURL)
+- }
+- } else {
+- if current.GE(latest.Version) {
+- fmt.Println("Congratulations, you are up to date with v", version)
+- } else {
+- fmt.Printf(
+- "There is a new latest release for you v"+
+- " v%s -> v%s", current, latest.Version.String(),
+- )
+- // Show prompt if there is no no-interactive flag
+- if !arguments.NoInteractive {
+- prompt := promptui.Prompt{
+- Label: "Do you want to update",
+- IsConfirm: true,
+- }
+-
+- _, err := prompt.Run()
+-
+- if err != nil {
+- fmt.Println("Update Cancelled")
+- return nil
+- }
+- }
+-
+- exe, err := os.Executable()
+- if err != nil {
+- fmt.Println("Could not locate executable path")
+- return err
+- }
+-
+- msg := fmt.Sprintf("# Updating to v%s", latest.Version)
+- fmt.Println(msg)
+- if err != nil {
+- return err
+- }
+- // Update executable
+- if err := selfupdate.UpdateTo(latest.AssetURL, exe); err != nil {
+- return err
+- }
+- color.Green("Successfully updated to version v%s", latest.Version)
+-
+- }
+-
+- }
++ fmt.Println("This version cannot perform self-updates")
+ return nil
+ }
next prev parent reply other threads:[~2022-07-28 14:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-28 8:12 [PR PATCH] transifex-cli: update to 1.3.0 tranzystorek-io
2022-07-28 14:21 ` [PR PATCH] [Updated] " tranzystorek-io
2022-07-28 14:29 ` [PR PATCH] [Updated] transifex-cli: update to 1.3.0, disable self-updates tranzystorek-io
2022-07-28 14:53 ` tranzystorek-io [this message]
2022-07-28 15:35 ` tranzystorek-io
2022-07-29 5:27 ` tranzystorek-io
2022-07-29 6:54 ` classabbyamp
2022-07-29 7:03 ` [PR PATCH] [Updated] " tranzystorek-io
2022-07-29 7:08 ` [PR PATCH] [Merged]: " classabbyamp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220728145319.gukdoFg0MvHXDPYYaLvULlfzN2HV2FsC5PhaJUvXk-E@z \
--to=tranzystorek-io@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).