Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] Add hg.sr.ht to update_check.sh
@ 2020-02-03 21:39 voidlinux-github
  2020-02-05  8:05 ` [PR PATCH] [Merged]: " voidlinux-github
  0 siblings, 1 reply; 2+ messages in thread
From: voidlinux-github @ 2020-02-03 21:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 464 bytes --]

There is a new pull request by zdykstra against master on the void-packages repository

https://github.com/zdykstra/void-packages hg.sr.ht
https://github.com/void-linux/void-packages/pull/18781

Add hg.sr.ht to update_check.sh
hg.sr.ht project pages are laid out quite closely to GitHubs format. We
can basically clone the check for GitHub to a new base URL of hg.sr.ht .

A patch file from https://github.com/void-linux/void-packages/pull/18781.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-hg.sr.ht-18781.patch --]
[-- Type: text/x-diff, Size: 1463 bytes --]

From 31e8e627b8c13cc1e27c48316b22052457112f84 Mon Sep 17 00:00:00 2001
From: Zach Dykstra <dykstra.zachary@gmail.com>
Date: Mon, 3 Feb 2020 15:37:03 -0600
Subject: [PATCH] Add hg.sr.ht to update_check.sh

hg.sr.ht project pages are laid out quite closely to GitHubs format. We
can basically clone the check for GitHub to a new base URL of hg.sr.ht .
---
 common/xbps-src/shutils/update_check.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/common/xbps-src/shutils/update_check.sh b/common/xbps-src/shutils/update_check.sh
index e278fe90e34..d463fa4fbe9 100644
--- a/common/xbps-src/shutils/update_check.sh
+++ b/common/xbps-src/shutils/update_check.sh
@@ -55,7 +55,8 @@ update_check() {
               *kernel.org/pub/linux/kernel/*|\
               *cran.r-project.org/src/contrib*|\
               *rubygems.org*|\
-              *crates.io*)
+              *crates.io*|\
+              *hg.sr.ht*)
                 continue
                 ;;
             *)
@@ -135,6 +136,10 @@ update_check() {
             *crates.io*)
                 url="https://crates.io/api/v1/crates/${pkgname#rust-}"
                 rx='/crates/'${pkgname#rust-}'/\K[0-9.]*(?=/download)' ;;
+            *hg.sr.ht*)
+                hgsrhtname="$(printf %s "$url" | cut -d/ -f4,5)"
+                url="https://hg.sr.ht/$hgsrhtname/tags"
+                rx='/archive/(v?|\Q'"$pkgname"'\E-)?\K[\d\.]+(?=\.tar\.gz")';;
             esac
         fi
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PR PATCH] [Merged]: Add hg.sr.ht to update_check.sh
  2020-02-03 21:39 [PR PATCH] Add hg.sr.ht to update_check.sh voidlinux-github
@ 2020-02-05  8:05 ` voidlinux-github
  0 siblings, 0 replies; 2+ messages in thread
From: voidlinux-github @ 2020-02-05  8:05 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 531 bytes --]

There's a merged pull request on the void-packages repository

Add hg.sr.ht to update_check.sh
https://github.com/void-linux/void-packages/pull/18781

Description:
hg.sr.ht project pages are laid out quite closely to GitHubs format. We
can basically clone the check for GitHub to a new base URL of hg.sr.ht .

```
env XBPS_UPDATE_CHECK_VERBOSE=1 xcheckmypkgs 
... <truncated output> ...
checking: wofi
fetching https://hg.sr.ht/~scoopta/wofi/tags
already fetched https://hg.sr.ht/~scoopta/wofi/tags
found version 1.0
```

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-05  8:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-03 21:39 [PR PATCH] Add hg.sr.ht to update_check.sh voidlinux-github
2020-02-05  8:05 ` [PR PATCH] [Merged]: " voidlinux-github

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).