~alpine/aports

2 2

[alpine-aports] [PATCH] community/hugo: update to 0.54.0; enable extended

Details
Message ID
<20190309010351.7737-1-sir@cmpwn.com>
Sender timestamp
1552093431
DKIM signature
missing
Download raw message
Patch: +75 -37
---
 ...ests.patch => 0001-Remove-git-tests.patch} | 82 +++++++++++++++----
 community/hugo/APKBUILD                       | 30 +++----
 2 files changed, 75 insertions(+), 37 deletions(-)
 rename community/hugo/{drop-git-tests.patch => 0001-Remove-git-tests.patch} (60%)

diff --git a/community/hugo/drop-git-tests.patch b/community/hugo/0001-Remove-git-tests.patch
similarity index 60%
rename from community/hugo/drop-git-tests.patch
rename to community/hugo/0001-Remove-git-tests.patch
index 0eca0825c4..db2eb43533 100644
--- a/community/hugo/drop-git-tests.patch
+++ b/community/hugo/0001-Remove-git-tests.patch
@@ -1,23 +1,32 @@
--- hugo-0.39-original/hugolib/page_test.go
+++ hugo-0.39-patched/hugolib/page_test.go
@@ -26,11 +26,6 @@
From a77897023bc3379f9ed15080d88dd944f3f51f94 Mon Sep 17 00:00:00 2001
From: Drew DeVault <sir@cmpwn.com>
Date: Fri, 8 Mar 2019 19:46:32 -0500
Subject: [PATCH] Remove git tests

---
 hugolib/page_test.go | 60 -----------------------------------
 releaser/git_test.go | 75 --------------------------------------------
 2 files changed, 135 deletions(-)
 delete mode 100644 releaser/git_test.go

diff --git a/hugolib/page_test.go b/hugolib/page_test.go
index 1db1d352..07c17e6d 100644
--- a/hugolib/page_test.go
+++ b/hugolib/page_test.go
@@ -26,9 +26,6 @@ import (
 	"testing"
 	"time"
 
-	"github.com/gohugoio/hugo/hugofs"
-	"github.com/spf13/afero"
-
-	"github.com/spf13/viper"
--
 	"github.com/gohugoio/hugo/deps"
 	"github.com/gohugoio/hugo/helpers"
 	"github.com/spf13/cast"
@@ -908,34 +903,6 @@
 	d, _ := time.Parse(time.RFC3339, "2013-05-17T16:59:30Z")
 	"github.com/spf13/viper"
 
 	"github.com/gohugoio/hugo/deps"
@@ -861,63 +858,6 @@ func TestPageWithDate(t *testing.T) {
 	checkPageDate(t, p, d)
-}
--
 }
 
-func TestPageWithLastmodFromGitInfo(t *testing.T) {
-	assrt := require.New(t)
-
@@ -29,25 +38,59 @@
-	cfg.Set("frontmatter", map[string]interface{}{
-		"lastmod": []string{":git", "lastmod"},
-	})
-	cfg.Set("defaultContentLanguage", "en")
-
-	langConfig := map[string]interface{}{
-		"en": map[string]interface{}{
-			"weight":       1,
-			"languageName": "English",
-			"contentDir":   "content",
-		},
-		"nn": map[string]interface{}{
-			"weight":       2,
-			"languageName": "Nynorsk",
-			"contentDir":   "content_nn",
-		},
-	}
-
-	cfg.Set("languages", langConfig)
-	cfg.Set("enableGitInfo", true)
-
-	assrt.NoError(loadDefaultSettingsFor(cfg))
-	assrt.NoError(loadLanguageSettings(cfg, nil))
-
-	wd, err := os.Getwd()
-	assrt.NoError(err)
-	cfg.Set("workingDir", filepath.Join(wd, "testsite"))
-
-	s := buildSingleSite(t, deps.DepsCfg{Fs: fs, Cfg: cfg}, BuildCfg{SkipRender: true})
-	h, err := NewHugoSites(deps.DepsCfg{Fs: fs, Cfg: cfg})
-
-	assrt.NoError(err)
-	assrt.Len(h.Sites, 2)
-
-	assrt.Len(s.RegularPages, 1)
-	require.NoError(t, h.Build(BuildCfg{SkipRender: true}))
-
-	enSite := h.Sites[0]
-	assrt.Len(enSite.RegularPages, 1)
-
-	// 2018-03-11 is the Git author date for testsite/content/first-post.md
-	assrt.Equal("2018-03-11", s.RegularPages[0].Lastmod.Format("2006-01-02"))
 }
 
-	assrt.Equal("2018-03-11", enSite.RegularPages[0].Lastmod.Format("2006-01-02"))
-
-	nnSite := h.Sites[1]
-	assrt.Len(nnSite.RegularPages, 1)
-
-	// 2018-08-11 is the Git author date for testsite/content_nn/first-post.md
-	assrt.Equal("2018-08-11", nnSite.RegularPages[0].Lastmod.Format("2006-01-02"))
-
-}
-
 func TestPageWithFrontMatterConfig(t *testing.T) {
--- hugo-0.39-original/releaser/git_test.go
 	t.Parallel()
 
diff --git a/releaser/git_test.go b/releaser/git_test.go
deleted file mode 100644
index f0d6fd24..00000000
--- a/releaser/git_test.go
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright 2017-present The Hugo Authors. All rights reserved.
@@ -125,3 +168,6 @@
-		t.Skip("Skip git test on Linux to make Travis happy.")
-	}
-}
-- 
2.21.0

diff --git a/community/hugo/APKBUILD b/community/hugo/APKBUILD
index 8e95c2ca6b..9ca8350707 100644
--- a/community/hugo/APKBUILD
+++ b/community/hugo/APKBUILD
@@ -1,35 +1,27 @@
# Contributor: Thomas Boerger <thomas@webhippie.de>
# Maintainer: Thomas Boerger <thomas@webhippie.de>
pkgname=hugo
pkgver=0.46
pkgver=0.54.0
pkgrel=0
pkgdesc="A Fast and Flexible Static Site Generator built with love in GoLang"
url="http://gohugo.io/"
arch="all !x86" # tests fails on x86
license="Apache-2.0"
depends=""
makedepends="go dep"
install=""
source="${pkgname}-${pkgver}.tar.gz::https://github.com/gohugoio/hugo/archive/v$pkgver.tar.gz
	drop-git-tests.patch"
builddir="$srcdir/src/github.com/gohugoio/$pkgname"

prepare() {
	mkdir -p ${builddir%/*}
	mv "$srcdir"/$pkgname-$pkgver "$builddir"/
	default_prepare
}
makedepends="go"
source="
	$pkgname-$pkgver.tar.gz::https://github.com/gohugoio/hugo/archive/v$pkgver.tar.gz
	0001-Remove-git-tests.patch
"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	mkdir -p "$GOPATH"
	cd "$builddir"
	export GOPATH="$srcdir"
	dep ensure -v
	go build -v -o bin/$pkgname
	go build -v -o bin/$pkgname --tags extended
}

check() {
	cd "$builddir"
	export GOPATH="$srcdir"
	go test ./...
}

@@ -37,5 +29,5 @@ package() {
	install -Dm755 "$builddir"/bin/$pkgname "$pkgdir"/usr/bin/$pkgname
}

sha512sums="b197a44b13df607cb6761d77a3f5ea3a40ec279151075ce0ec0db38797c7aef7d26689699d5a3aaa9e35405d388989d3a5da15227b06652ebed01aa5d6fa916c  hugo-0.46.tar.gz
31f212a444998a582c5c71beb9522e665242cf973322a4cfce2f756a24fae03b194b8aa33fde233212b9624f311f6dc56f123183f61bf8cd7f3cbd695e7b86c5  drop-git-tests.patch"
sha512sums="904b9ae9e3db91195e9e768faca8867d6534d20f64b19dec4d1788ca5f19863e9fac284821855ffef9bee6280d77cc72816c42b6e28b5f3a4f45d12daf6b9d0d  hugo-0.54.0.tar.gz
be2cd72475db35465bc6a0b091640ba65d4c41c686ed218d715b29b9b36d128e37579c719a203ccaa1d2563faac7307934485f30fef913d05b8c85251d086572  0001-Remove-git-tests.patch"
-- 
2.21.0



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---

[alpine-aports] [PATCH v2] community/hugo: update to 0.54.0; enable extended

Details
Message ID
<20190311191654.2807-1-sir@cmpwn.com>
In-Reply-To
<CAGG_d8Dj3gE2PKQ=zC1ku1qKe3ZrNvTjcft_iEXYSwy3pSK1rw@mail.gmail.com> (view parent)
Sender timestamp
1552331814
DKIM signature
missing
Download raw message
Patch: +74 -37
---
 ...ests.patch => 0001-Remove-git-tests.patch} | 82 +++++++++++++++----
 community/hugo/APKBUILD                       | 29 +++----
 2 files changed, 74 insertions(+), 37 deletions(-)
 rename community/hugo/{drop-git-tests.patch => 0001-Remove-git-tests.patch} (60%)

diff --git a/community/hugo/drop-git-tests.patch b/community/hugo/0001-Remove-git-tests.patch
similarity index 60%
rename from community/hugo/drop-git-tests.patch
rename to community/hugo/0001-Remove-git-tests.patch
index 0eca0825c4..db2eb43533 100644
--- a/community/hugo/drop-git-tests.patch
+++ b/community/hugo/0001-Remove-git-tests.patch
@@ -1,23 +1,32 @@
--- hugo-0.39-original/hugolib/page_test.go
+++ hugo-0.39-patched/hugolib/page_test.go
@@ -26,11 +26,6 @@
From a77897023bc3379f9ed15080d88dd944f3f51f94 Mon Sep 17 00:00:00 2001
From: Drew DeVault <sir@cmpwn.com>
Date: Fri, 8 Mar 2019 19:46:32 -0500
Subject: [PATCH] Remove git tests

---
 hugolib/page_test.go | 60 -----------------------------------
 releaser/git_test.go | 75 --------------------------------------------
 2 files changed, 135 deletions(-)
 delete mode 100644 releaser/git_test.go

diff --git a/hugolib/page_test.go b/hugolib/page_test.go
index 1db1d352..07c17e6d 100644
--- a/hugolib/page_test.go
+++ b/hugolib/page_test.go
@@ -26,9 +26,6 @@ import (
 	"testing"
 	"time"
 
-	"github.com/gohugoio/hugo/hugofs"
-	"github.com/spf13/afero"
-
-	"github.com/spf13/viper"
--
 	"github.com/gohugoio/hugo/deps"
 	"github.com/gohugoio/hugo/helpers"
 	"github.com/spf13/cast"
@@ -908,34 +903,6 @@
 	d, _ := time.Parse(time.RFC3339, "2013-05-17T16:59:30Z")
 	"github.com/spf13/viper"
 
 	"github.com/gohugoio/hugo/deps"
@@ -861,63 +858,6 @@ func TestPageWithDate(t *testing.T) {
 	checkPageDate(t, p, d)
-}
--
 }
 
-func TestPageWithLastmodFromGitInfo(t *testing.T) {
-	assrt := require.New(t)
-
@@ -29,25 +38,59 @@
-	cfg.Set("frontmatter", map[string]interface{}{
-		"lastmod": []string{":git", "lastmod"},
-	})
-	cfg.Set("defaultContentLanguage", "en")
-
-	langConfig := map[string]interface{}{
-		"en": map[string]interface{}{
-			"weight":       1,
-			"languageName": "English",
-			"contentDir":   "content",
-		},
-		"nn": map[string]interface{}{
-			"weight":       2,
-			"languageName": "Nynorsk",
-			"contentDir":   "content_nn",
-		},
-	}
-
-	cfg.Set("languages", langConfig)
-	cfg.Set("enableGitInfo", true)
-
-	assrt.NoError(loadDefaultSettingsFor(cfg))
-	assrt.NoError(loadLanguageSettings(cfg, nil))
-
-	wd, err := os.Getwd()
-	assrt.NoError(err)
-	cfg.Set("workingDir", filepath.Join(wd, "testsite"))
-
-	s := buildSingleSite(t, deps.DepsCfg{Fs: fs, Cfg: cfg}, BuildCfg{SkipRender: true})
-	h, err := NewHugoSites(deps.DepsCfg{Fs: fs, Cfg: cfg})
-
-	assrt.NoError(err)
-	assrt.Len(h.Sites, 2)
-
-	assrt.Len(s.RegularPages, 1)
-	require.NoError(t, h.Build(BuildCfg{SkipRender: true}))
-
-	enSite := h.Sites[0]
-	assrt.Len(enSite.RegularPages, 1)
-
-	// 2018-03-11 is the Git author date for testsite/content/first-post.md
-	assrt.Equal("2018-03-11", s.RegularPages[0].Lastmod.Format("2006-01-02"))
 }
 
-	assrt.Equal("2018-03-11", enSite.RegularPages[0].Lastmod.Format("2006-01-02"))
-
-	nnSite := h.Sites[1]
-	assrt.Len(nnSite.RegularPages, 1)
-
-	// 2018-08-11 is the Git author date for testsite/content_nn/first-post.md
-	assrt.Equal("2018-08-11", nnSite.RegularPages[0].Lastmod.Format("2006-01-02"))
-
-}
-
 func TestPageWithFrontMatterConfig(t *testing.T) {
--- hugo-0.39-original/releaser/git_test.go
 	t.Parallel()
 
diff --git a/releaser/git_test.go b/releaser/git_test.go
deleted file mode 100644
index f0d6fd24..00000000
--- a/releaser/git_test.go
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright 2017-present The Hugo Authors. All rights reserved.
@@ -125,3 +168,6 @@
-		t.Skip("Skip git test on Linux to make Travis happy.")
-	}
-}
-- 
2.21.0

diff --git a/community/hugo/APKBUILD b/community/hugo/APKBUILD
index 8e95c2ca6b..bdb452268f 100644
--- a/community/hugo/APKBUILD
+++ b/community/hugo/APKBUILD
@@ -1,35 +1,26 @@
# Contributor: Thomas Boerger <thomas@webhippie.de>
# Maintainer: Thomas Boerger <thomas@webhippie.de>
pkgname=hugo
pkgver=0.46
pkgver=0.54.0
pkgrel=0
pkgdesc="A Fast and Flexible Static Site Generator built with love in GoLang"
url="http://gohugo.io/"
arch="all !x86" # tests fails on x86
license="Apache-2.0"
depends=""
makedepends="go dep"
install=""
source="${pkgname}-${pkgver}.tar.gz::https://github.com/gohugoio/hugo/archive/v$pkgver.tar.gz
	drop-git-tests.patch"
builddir="$srcdir/src/github.com/gohugoio/$pkgname"

prepare() {
	mkdir -p ${builddir%/*}
	mv "$srcdir"/$pkgname-$pkgver "$builddir"/
	default_prepare
}
makedepends="go"
source="
	$pkgname-$pkgver.tar.gz::https://github.com/gohugoio/hugo/archive/v$pkgver.tar.gz
	0001-Remove-git-tests.patch
"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	export GOPATH="$srcdir"
	dep ensure -v
	go build -v -o bin/$pkgname
	go build -v -o bin/$pkgname --tags extended
}

check() {
	cd "$builddir"
	export GOPATH="$srcdir"
	go test ./...
}

@@ -37,5 +28,5 @@ package() {
	install -Dm755 "$builddir"/bin/$pkgname "$pkgdir"/usr/bin/$pkgname
}

sha512sums="b197a44b13df607cb6761d77a3f5ea3a40ec279151075ce0ec0db38797c7aef7d26689699d5a3aaa9e35405d388989d3a5da15227b06652ebed01aa5d6fa916c  hugo-0.46.tar.gz
31f212a444998a582c5c71beb9522e665242cf973322a4cfce2f756a24fae03b194b8aa33fde233212b9624f311f6dc56f123183f61bf8cd7f3cbd695e7b86c5  drop-git-tests.patch"
sha512sums="904b9ae9e3db91195e9e768faca8867d6534d20f64b19dec4d1788ca5f19863e9fac284821855ffef9bee6280d77cc72816c42b6e28b5f3a4f45d12daf6b9d0d  hugo-0.54.0.tar.gz
be2cd72475db35465bc6a0b091640ba65d4c41c686ed218d715b29b9b36d128e37579c719a203ccaa1d2563faac7307934485f30fef913d05b8c85251d086572  0001-Remove-git-tests.patch"
-- 
2.21.0



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Leonardo Arena <rnalrd@gmail.com>
Details
Message ID
<CAGG_d8Dj3gE2PKQ=zC1ku1qKe3ZrNvTjcft_iEXYSwy3pSK1rw@mail.gmail.com>
In-Reply-To
<20190309010351.7737-1-sir@cmpwn.com> (view parent)
Sender timestamp
1552319905
DKIM signature
missing
Download raw message
Hi,

On Sat, Mar 9, 2019 at 2:04 AM Drew DeVault <sir@cmpwn.com> wrote:

> ---
>  ...ests.patch => 0001-Remove-git-tests.patch} | 82 +++++++++++++++----
>  community/hugo/APKBUILD                       | 30 +++----
>  2 files changed, 75 insertions(+), 37 deletions(-)
>  rename community/hugo/{drop-git-tests.patch =>
> 0001-Remove-git-tests.patch} (60%)
>
>
[snip]


>
>  build() {
> +       mkdir -p "$GOPATH"
>

$GOPATH is not defined

Thanks

/eo
Reply to thread Export thread (mbox)