Skip to content

Commit bd4e264

Browse files
committed
Update upstream source from tag 'upstream/0.7.0'
Update to upstream version '0.7.0' with Debian dir ee25f3c
2 parents 84f9ea3 + 5f006f3 commit bd4e264

16 files changed

+267
-164
lines changed

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2+
version: 2
3+
updates:
4+
- package-ecosystem: "gomod"
5+
directory: "/"
6+
schedule:
7+
interval: "daily"

.github/workflows/ci-test.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
11
name: CI Test
22

3-
on: [push, pull_request, workflow_dispatch]
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
47

58
jobs:
69
ci-test:
7-
runs-on: ubuntu-latest
10+
runs-on: ubuntu-22.04
811
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
912
strategy:
1013
matrix:
11-
go-version: ['1.16.x', '1.17.x']
12-
env:
13-
GO111MODULE: on # Needed for github.com/google/go-github/v38
14+
go-version: ['1.21', '1.22']
1415

1516
steps:
16-
- name: Checkout code
17-
uses: actions/checkout@v2
17+
- name: Checkout
18+
uses: actions/checkout@v4
1819

1920
- name: Install Go ${{ matrix.go-version }}
20-
uses: actions/setup-go@v2
21+
uses: actions/setup-go@v5
2122
with:
2223
go-version: ${{ matrix.go-version }}
24+
check-latest: true
2325

2426
- run: diff -u <(echo -n) <(gofmt -d -s .)
2527

26-
- run: go get -t -v ./...
28+
- run: go install -v ./...
2729

2830
- run: go test -v ./...
2931

@@ -32,7 +34,7 @@ jobs:
3234
- name: apt install needed Debian packages
3335
run: |
3436
sudo eatmydata apt update
35-
sudo eatmydata apt install git-buildpackage golang-any pristine-tar pandoc
37+
sudo eatmydata apt install git-buildpackage pristine-tar pandoc
3638
3739
- name: Generate man page from Markdown
3840
run: pandoc -f markdown -t man -s dh-make-golang.md -o dh-make-golang.1
@@ -46,7 +48,7 @@ jobs:
4648
~/go/bin/dh-make-golang -type p -pristine-tar -program_package_name gh github.com/cli/cli
4749
4850
- name: Upload dh-make-golang test run as artifact
49-
uses: actions/upload-artifact@v2
51+
uses: actions/upload-artifact@v4
5052
with:
5153
name: dh-make-golang_test-run_go${{ matrix.go-version }}
5254
path: _test-run

check_depends.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ package main
22

33
import (
44
"fmt"
5-
"golang.org/x/mod/modfile"
6-
"golang.org/x/tools/go/vcs"
7-
"io/ioutil"
85
"log"
96
"os"
107
"path/filepath"
11-
"pault.ag/go/debian/control"
128
"strings"
9+
10+
"golang.org/x/mod/modfile"
11+
"golang.org/x/tools/go/vcs"
12+
"pault.ag/go/debian/control"
1313
)
1414

1515
type dependency struct {
@@ -92,7 +92,7 @@ func execCheckDepends(args []string) {
9292
// i.e. it returns the one defined in go.mod as well as the transitively ones
9393
// TODO: this may not be the best way of doing thing since it requires the package to be converted to go module
9494
func parseGoModDependencies(directory string, goBinaries map[string]string) ([]dependency, error) {
95-
b, err := ioutil.ReadFile(filepath.Join(directory, "go.mod"))
95+
b, err := os.ReadFile(filepath.Join(directory, "go.mod"))
9696
if err != nil {
9797
return nil, err
9898
}

check_depends_test.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package main
22

33
import (
4-
"io/ioutil"
54
"os"
65
"path/filepath"
76
"reflect"
@@ -18,7 +17,7 @@ Testsuite: autopkgtest-pkg-go
1817
Priority: optional
1918
Build-Depends:
2019
debhelper-compat (= 13),
21-
dh-golang,
20+
dh-sequence-golang,
2221
golang-any,
2322
golang-github-advancedlogic-goose-dev,
2423
golang-github-fatih-color-dev,
@@ -43,7 +42,7 @@ Description: read your RSS feeds from your terminal
4342
Terminews is a terminal based application (TUI)
4443
that allows you to manage RSS resources and display their news feeds.
4544
`
46-
tmpDir, err := ioutil.TempDir("", "dh-make-golang")
45+
tmpDir, err := os.MkdirTemp("", "dh-make-golang")
4746
if err != nil {
4847
t.Fatalf("Could not create temp dir: %v", err)
4948
}
@@ -52,7 +51,7 @@ Description: read your RSS feeds from your terminal
5251
if err := os.MkdirAll(filepath.Join(tmpDir, "dummy-package", "debian"), 0750); err != nil {
5352
t.Fatalf("Could not create dummy Debian package: %v", err)
5453
}
55-
if err := ioutil.WriteFile(filepath.Join(tmpDir, "dummy-package", "debian", "control"), []byte(f), 0640); err != nil {
54+
if err := os.WriteFile(filepath.Join(tmpDir, "dummy-package", "debian", "control"), []byte(f), 0640); err != nil {
5655
t.Fatalf("Could not create dummy Debian package: %v", err)
5756
}
5857

@@ -96,10 +95,10 @@ go 1.16
9695
9796
require (
9897
github.com/charmbracelet/glamour v0.3.0
99-
github.com/google/go-github/v38 v38.1.0
98+
github.com/google/go-github/v60 v60.0.0
10099
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79
101100
)`
102-
tmpDir, err := ioutil.TempDir("", "dh-make-golang")
101+
tmpDir, err := os.MkdirTemp("", "dh-make-golang")
103102
if err != nil {
104103
t.Fatalf("Could not create temp dir: %v", err)
105104
}
@@ -108,7 +107,7 @@ require (
108107
if err := os.MkdirAll(filepath.Join(tmpDir, "dummy-package"), 0750); err != nil {
109108
t.Fatalf("Could not create dummy Debian package: %v", err)
110109
}
111-
if err := ioutil.WriteFile(filepath.Join(tmpDir, "dummy-package", "go.mod"), []byte(f), 0640); err != nil {
110+
if err := os.WriteFile(filepath.Join(tmpDir, "dummy-package", "go.mod"), []byte(f), 0640); err != nil {
112111
t.Fatalf("Could not create dummy Debian package: %v", err)
113112
}
114113

create_salsa_project.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package main
33
import (
44
"flag"
55
"fmt"
6-
"io/ioutil"
6+
"io"
77
"log"
88
"net/http"
99
"net/url"
@@ -41,7 +41,7 @@ func execCreateSalsaProject(args []string) {
4141
log.Fatalf("http post: %s", err)
4242
}
4343
if got, want := resp.StatusCode, http.StatusOK; got != want {
44-
b, _ := ioutil.ReadAll(resp.Body)
44+
b, _ := io.ReadAll(resp.Body)
4545
log.Fatalf("unexpected HTTP status code: got %d, want %d (response: %s)", got, want, string(b))
4646
}
4747
}

estimate.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"flag"
55
"fmt"
66
"go/build"
7-
"io/ioutil"
87
"log"
98
"os"
109
"os/exec"
@@ -59,7 +58,7 @@ func removeVendor(gopath string) (found bool, _ error) {
5958

6059
func estimate(importpath string) error {
6160
// construct a separate GOPATH in a temporary directory
62-
gopath, err := ioutil.TempDir("", "dh-make-golang")
61+
gopath, err := os.MkdirTemp("", "dh-make-golang")
6362
if err != nil {
6463
return fmt.Errorf("create temp dir: %w", err)
6564
}

go.mod

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,39 @@
11
module github.com/Debian/dh-make-golang
22

3-
go 1.16
3+
go 1.21
4+
5+
toolchain go1.22.1
46

57
require (
6-
github.com/charmbracelet/glamour v0.3.0
7-
github.com/google/go-github/v38 v38.1.0
8+
github.com/charmbracelet/glamour v0.3.1-0.20211129115518-6db32e77e152
9+
github.com/google/go-github/v60 v60.0.0
810
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79
9-
github.com/mattn/go-isatty v0.0.12
10-
golang.org/x/mod v0.5.1 // indirect
11-
golang.org/x/net v0.0.0-20210331212208-0fccb6fa2b5c
12-
golang.org/x/sync v0.0.0-20190423024810-112230192c58
13-
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e
11+
github.com/mattn/go-isatty v0.0.14
12+
golang.org/x/mod v0.15.0
13+
golang.org/x/net v0.21.0
14+
golang.org/x/sync v0.6.0
15+
golang.org/x/sys v0.17.0
16+
golang.org/x/tools v0.13.0
17+
golang.org/x/tools/go/vcs v0.1.0-deprecated
1418
pault.ag/go/debian v0.12.0
1519
)
20+
21+
require (
22+
github.com/alecthomas/chroma v0.9.4 // indirect
23+
github.com/aymerick/douceur v0.2.0 // indirect
24+
github.com/dlclark/regexp2 v1.4.0 // indirect
25+
github.com/google/go-querystring v1.1.0 // indirect
26+
github.com/gorilla/css v1.0.0 // indirect
27+
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
28+
github.com/mattn/go-runewidth v0.0.13 // indirect
29+
github.com/microcosm-cc/bluemonday v1.0.16 // indirect
30+
github.com/muesli/reflow v0.3.0 // indirect
31+
github.com/muesli/termenv v0.9.0 // indirect
32+
github.com/olekukonko/tablewriter v0.0.5 // indirect
33+
github.com/rivo/uniseg v0.2.0 // indirect
34+
github.com/stretchr/testify v1.8.1 // indirect
35+
github.com/yuin/goldmark v1.4.13 // indirect
36+
github.com/yuin/goldmark-emoji v1.0.1 // indirect
37+
golang.org/x/crypto v0.19.0 // indirect
38+
pault.ag/go/topsort v0.0.0-20160530003732-f98d2ad46e1a // indirect
39+
)

0 commit comments

Comments
 (0)