未验证 提交 e50cc02b 编写于 作者: M Mislav Marohnić 提交者: GitHub

Merge pull request #2518 from novas0x2a/pathv2

add /v2 to the module name to resolve the module path problem

Fixes  #2517
......@@ -51,7 +51,7 @@ bin/hub: $(SOURCES)
script/build -o $@
bin/md2roff: $(SOURCES)
go build -o $@ github.com/github/hub/md2roff-bin
go build -o $@ github.com/github/hub/v2/md2roff-bin
test:
go test ./...
......
......@@ -8,7 +8,7 @@ import (
"strings"
"syscall"
"github.com/github/hub/ui"
"github.com/github/hub/v2/ui"
)
// Cmd is a project-wide struct that represents a command to be run in the console.
......
......@@ -3,7 +3,7 @@ package cmd
import (
"testing"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/internal/assert"
)
func TestNew(t *testing.T) {
......
......@@ -7,8 +7,8 @@ import (
"regexp"
"strings"
"github.com/github/hub/ui"
"github.com/github/hub/utils"
"github.com/github/hub/v2/ui"
"github.com/github/hub/v2/utils"
)
var cmdAlias = &Command{
......
......@@ -11,9 +11,9 @@ import (
"strings"
"time"
"github.com/github/hub/github"
"github.com/github/hub/ui"
"github.com/github/hub/utils"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/ui"
"github.com/github/hub/v2/utils"
)
var cmdAPI = &Command{
......
......@@ -6,8 +6,8 @@ import (
"os"
"regexp"
"github.com/github/hub/github"
"github.com/github/hub/utils"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/utils"
)
var cmdApply = &Command{
......
......@@ -4,8 +4,8 @@ import (
"fmt"
"strings"
"github.com/github/hub/cmd"
"github.com/github/hub/utils"
"github.com/github/hub/v2/cmd"
"github.com/github/hub/v2/utils"
)
type Args struct {
......
......@@ -3,7 +3,7 @@ package commands
import (
"testing"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/internal/assert"
)
func TestNewArgs(t *testing.T) {
......
......@@ -5,8 +5,8 @@ import (
"net/url"
"strings"
"github.com/github/hub/github"
"github.com/github/hub/utils"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/utils"
)
var cmdBrowse = &Command{
......
......@@ -4,9 +4,9 @@ import (
"fmt"
"regexp"
"github.com/github/hub/git"
"github.com/github/hub/github"
"github.com/github/hub/utils"
"github.com/github/hub/v2/git"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/utils"
)
var cmdCheckout = &Command{
......
......@@ -4,8 +4,8 @@ import (
"fmt"
"regexp"
"github.com/github/hub/github"
"github.com/github/hub/utils"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/utils"
)
var cmdCherryPick = &Command{
......
......@@ -5,10 +5,10 @@ import (
"os"
"sort"
"github.com/github/hub/git"
"github.com/github/hub/github"
"github.com/github/hub/ui"
"github.com/github/hub/utils"
"github.com/github/hub/v2/git"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/ui"
"github.com/github/hub/v2/utils"
)
var cmdCiStatus = &Command{
......
......@@ -5,8 +5,8 @@ import (
"regexp"
"strings"
"github.com/github/hub/github"
"github.com/github/hub/utils"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/utils"
)
var cmdClone = &Command{
......
......@@ -5,7 +5,7 @@ import (
"regexp"
"strings"
"github.com/github/hub/utils"
"github.com/github/hub/v2/utils"
)
var (
......
......@@ -6,8 +6,8 @@ import (
"regexp"
"testing"
"github.com/github/hub/internal/assert"
"github.com/github/hub/ui"
"github.com/github/hub/v2/internal/assert"
"github.com/github/hub/v2/ui"
)
func TestMain(m *testing.M) {
......
......@@ -6,8 +6,8 @@ import (
"regexp"
"strings"
"github.com/github/hub/github"
"github.com/github/hub/utils"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/utils"
)
var cmdCompare = &Command{
......
package commands
import (
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/internal/assert"
"testing"
)
......
......@@ -4,10 +4,10 @@ import (
"fmt"
"strings"
"github.com/github/hub/git"
"github.com/github/hub/github"
"github.com/github/hub/ui"
"github.com/github/hub/utils"
"github.com/github/hub/v2/git"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/ui"
"github.com/github/hub/v2/utils"
)
var cmdCreate = &Command{
......
......@@ -7,9 +7,9 @@ import (
"regexp"
"strings"
"github.com/github/hub/github"
"github.com/github/hub/ui"
"github.com/github/hub/utils"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/ui"
"github.com/github/hub/v2/utils"
)
var cmdDelete = &Command{
......
......@@ -5,8 +5,8 @@ import (
"regexp"
"strings"
"github.com/github/hub/github"
"github.com/github/hub/utils"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/utils"
)
var cmdFetch = &Command{
......
package commands
import (
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/internal/assert"
"testing"
)
......
......@@ -3,9 +3,9 @@ package commands
import (
"fmt"
"github.com/github/hub/github"
"github.com/github/hub/ui"
"github.com/github/hub/utils"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/ui"
"github.com/github/hub/v2/utils"
)
var cmdFork = &Command{
......
......@@ -5,9 +5,9 @@ import (
"sort"
"strings"
"github.com/github/hub/github"
"github.com/github/hub/ui"
"github.com/github/hub/utils"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/ui"
"github.com/github/hub/v2/utils"
)
var (
......
......@@ -8,9 +8,9 @@ import (
"sort"
"strings"
"github.com/github/hub/git"
"github.com/github/hub/ui"
"github.com/github/hub/utils"
"github.com/github/hub/v2/git"
"github.com/github/hub/v2/ui"
"github.com/github/hub/v2/utils"
"github.com/kballard/go-shellquote"
)
......
......@@ -5,8 +5,8 @@ import (
"regexp"
"strings"
"github.com/github/hub/github"
"github.com/github/hub/utils"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/utils"
)
var cmdInit = &Command{
......
......@@ -6,8 +6,8 @@ import (
"path/filepath"
"testing"
"github.com/github/hub/github"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/internal/assert"
)
func setupInitContext() {
......
......@@ -7,10 +7,10 @@ import (
"strings"
"time"
"github.com/github/hub/git"
"github.com/github/hub/github"
"github.com/github/hub/ui"
"github.com/github/hub/utils"
"github.com/github/hub/v2/git"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/ui"
"github.com/github/hub/v2/utils"
)
var (
......
......@@ -4,7 +4,7 @@ import (
"testing"
"time"
"github.com/github/hub/github"
"github.com/github/hub/v2/github"
)
type formatIssueTest struct {
......
......@@ -4,8 +4,8 @@ import (
"fmt"
"regexp"
"github.com/github/hub/github"
"github.com/github/hub/utils"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/utils"
)
var cmdMerge = &Command{
......
......@@ -5,10 +5,10 @@ import (
"strconv"
"strings"
"github.com/github/hub/git"
"github.com/github/hub/github"
"github.com/github/hub/ui"
"github.com/github/hub/utils"
"github.com/github/hub/v2/git"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/ui"
"github.com/github/hub/v2/utils"
)
var (
......
......@@ -8,9 +8,9 @@ import (
"strings"
"time"
"github.com/github/hub/git"
"github.com/github/hub/github"
"github.com/github/hub/utils"
"github.com/github/hub/v2/git"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/utils"
)
var cmdPullRequest = &Command{
......
......@@ -3,8 +3,8 @@ package commands
import (
"testing"
"github.com/github/hub/github"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/internal/assert"
)
func TestPullRequest_ParsePullRequestProject(t *testing.T) {
......
......@@ -3,8 +3,8 @@ package commands
import (
"strings"
"github.com/github/hub/github"
"github.com/github/hub/utils"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/utils"
)
var cmdPush = &Command{
......
package commands
import (
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/internal/assert"
"testing"
)
......
......@@ -8,9 +8,9 @@ import (
"strings"
"time"
"github.com/github/hub/github"
"github.com/github/hub/ui"
"github.com/github/hub/utils"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/ui"
"github.com/github/hub/v2/utils"
)
var (
......
......@@ -5,9 +5,9 @@ import (
"regexp"
"strings"
"github.com/github/hub/git"
"github.com/github/hub/github"
"github.com/github/hub/utils"
"github.com/github/hub/v2/git"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/utils"
)
var cmdRemote = &Command{
......
......@@ -5,9 +5,9 @@ import (
"regexp"
"testing"
"github.com/github/hub/fixtures"
"github.com/github/hub/github"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/fixtures"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/internal/assert"
)
func TestTransformRemoteArgs(t *testing.T) {
......
......@@ -4,9 +4,9 @@ import (
"fmt"
"strings"
"github.com/github/hub/cmd"
"github.com/github/hub/git"
"github.com/github/hub/ui"
"github.com/github/hub/v2/cmd"
"github.com/github/hub/v2/git"
"github.com/github/hub/v2/ui"
"github.com/kballard/go-shellquote"
)
......
......@@ -3,7 +3,7 @@ package commands
import (
"testing"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/internal/assert"
)
func TestRunner_splitAliasCmd(t *testing.T) {
......
......@@ -5,10 +5,10 @@ import (
"regexp"
"strings"
"github.com/github/hub/git"
"github.com/github/hub/github"
"github.com/github/hub/ui"
"github.com/github/hub/utils"
"github.com/github/hub/v2/git"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/ui"
"github.com/github/hub/v2/utils"
)
var cmdSync = &Command{
......
......@@ -9,9 +9,9 @@ import (
"strings"
"github.com/atotto/clipboard"
"github.com/github/hub/git"
"github.com/github/hub/ui"
"github.com/github/hub/utils"
"github.com/github/hub/v2/git"
"github.com/github/hub/v2/ui"
"github.com/github/hub/v2/utils"
)
type stringSliceValue []string
......
......@@ -5,7 +5,7 @@ import (
"os"
"testing"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/internal/assert"
)
func TestDirIsNotEmpty(t *testing.T) {
......
package commands
import (
"github.com/github/hub/ui"
"github.com/github/hub/version"
"github.com/github/hub/v2/ui"
"github.com/github/hub/v2/version"
)
var cmdVersion = &Command{
......
......@@ -6,7 +6,7 @@ import (
"os"
"path/filepath"
"github.com/github/hub/cmd"
"github.com/github/hub/v2/cmd"
)
type TestRepo struct {
......
......@@ -6,7 +6,7 @@ import (
"path/filepath"
"strings"
"github.com/github/hub/cmd"
"github.com/github/hub/v2/cmd"
)
var GlobalFlags []string
......
......@@ -6,8 +6,8 @@ import (
"strings"
"testing"
"github.com/github/hub/fixtures"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/fixtures"
"github.com/github/hub/v2/internal/assert"
)
func TestGitDir(t *testing.T) {
......
......@@ -5,7 +5,7 @@ import (
"os"
"testing"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/internal/assert"
)
func TestSSHConfigReader_Read(t *testing.T) {
......
......@@ -3,7 +3,7 @@ package git
import (
"testing"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/internal/assert"
)
func createURLParser() *URLParser {
......
......@@ -5,7 +5,7 @@ import (
"regexp"
"strings"
"github.com/github/hub/git"
"github.com/github/hub/v2/git"
)
type Branch struct {
......
......@@ -3,7 +3,7 @@ package github
import (
"testing"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/internal/assert"
)
func TestBranch_ShortName(t *testing.T) {
......
......@@ -17,7 +17,7 @@ import (
"strings"
"time"
"github.com/github/hub/version"
"github.com/github/hub/v2/version"
)
const (
......
......@@ -6,7 +6,7 @@ import (
"regexp"
"testing"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/internal/assert"
)
func TestClient_FormatError(t *testing.T) {
......
......@@ -12,8 +12,8 @@ import (
"strings"
"syscall"
"github.com/github/hub/ui"
"github.com/github/hub/utils"
"github.com/github/hub/v2/ui"
"github.com/github/hub/v2/utils"
"github.com/mitchellh/go-homedir"
"golang.org/x/crypto/ssh/terminal"
)
......
......@@ -6,8 +6,8 @@ import (
"strings"
"testing"
"github.com/github/hub/fixtures"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/fixtures"
"github.com/github/hub/v2/internal/assert"
)
func TestConfigService_TomlLoad(t *testing.T) {
......
......@@ -10,10 +10,10 @@ import (
"runtime"
"strings"
"github.com/github/hub/git"
"github.com/github/hub/ui"
"github.com/github/hub/utils"
"github.com/github/hub/version"
"github.com/github/hub/v2/git"
"github.com/github/hub/v2/ui"
"github.com/github/hub/v2/utils"
"github.com/github/hub/v2/version"
)
const (
......
......@@ -3,7 +3,7 @@ package github
import (
"testing"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/internal/assert"
)
func TestStackRemoveSelfAndPanic(t *testing.T) {
......
......@@ -10,8 +10,8 @@ import (
"regexp"
"strings"
"github.com/github/hub/cmd"
"github.com/github/hub/git"
"github.com/github/hub/v2/cmd"
"github.com/github/hub/v2/git"
"github.com/kballard/go-shellquote"
)
......
......@@ -6,7 +6,7 @@ import (
"os"
"testing"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/internal/assert"
)
func TestEditor_openAndEdit_deleteFileWhenOpeningEditorFails(t *testing.T) {
......
......@@ -6,7 +6,7 @@ import (
"os"
"strings"
"github.com/github/hub/git"
"github.com/github/hub/v2/git"
)
var (
......
......@@ -21,8 +21,8 @@ import (
"strings"
"time"
"github.com/github/hub/ui"
"github.com/github/hub/utils"
"github.com/github/hub/v2/ui"
"github.com/github/hub/v2/utils"
"golang.org/x/net/http/httpproxy"
)
......
......@@ -12,7 +12,7 @@ import (
"os"
"testing"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/internal/assert"
)
func setupTestServer(unixSocket string) *testServer {
......
......@@ -5,7 +5,7 @@ import (
"net/url"
"strings"
"github.com/github/hub/git"
"github.com/github/hub/v2/git"
)
func LocalRepo() (repo *GitHubRepo, err error) {
......
......@@ -4,7 +4,7 @@ import (
"net/url"
"testing"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/internal/assert"
)
func TestGitHubRepo_remotesForPublish(t *testing.T) {
......
......@@ -3,7 +3,7 @@ package github
import (
"testing"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/internal/assert"
)
func TestMessageBuilder_multiline_title(t *testing.T) {
......
......@@ -7,8 +7,8 @@ import (
"path/filepath"
"strings"
"github.com/github/hub/git"
"github.com/github/hub/utils"
"github.com/github/hub/v2/git"
"github.com/github/hub/v2/utils"
)
type Project struct {
......
......@@ -5,8 +5,8 @@ import (
"os"
"testing"
"github.com/github/hub/fixtures"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/fixtures"
"github.com/github/hub/v2/internal/assert"
)
func TestSameAs(t *testing.T) {
......
......@@ -6,7 +6,7 @@ import (
"regexp"
"strings"
"github.com/github/hub/git"
"github.com/github/hub/v2/git"
)
var (
......
......@@ -3,8 +3,8 @@ package github
import (
"testing"
"github.com/github/hub/fixtures"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/fixtures"
"github.com/github/hub/v2/internal/assert"
)
func TestGithubRemote_NoPush(t *testing.T) {
......
......@@ -5,7 +5,7 @@ package github
import (
"os"
"github.com/github/hub/cmd"
"github.com/github/hub/v2/cmd"
)
func setConsole(cmd *cmd.Cmd) {
......
......@@ -2,7 +2,7 @@
package github
import "github.com/github/hub/cmd"
import "github.com/github/hub/v2/cmd"
// This does nothing on windows
func setConsole(cmd *cmd.Cmd) {
......
......@@ -5,8 +5,8 @@ import (
"path/filepath"
"testing"
"github.com/github/hub/fixtures"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/fixtures"
"github.com/github/hub/v2/internal/assert"
)
var prContent = `Description
......
......@@ -3,8 +3,8 @@ package github
import (
"testing"
"github.com/github/hub/fixtures"
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/fixtures"
"github.com/github/hub/v2/internal/assert"
)
func TestParseURL(t *testing.T) {
......
package github
import (
"github.com/github/hub/git"
"github.com/github/hub/v2/git"
)
func IsHTTPSProtocol() bool {
......
......@@ -7,9 +7,9 @@ import (
"os/exec"
"syscall"
"github.com/github/hub/commands"
"github.com/github/hub/github"
"github.com/github/hub/ui"
"github.com/github/hub/v2/commands"
"github.com/github/hub/v2/github"
"github.com/github/hub/v2/ui"
)
func main() {
......
......@@ -11,8 +11,8 @@ import (
"strings"
"text/template"
"github.com/github/hub/md2roff"
"github.com/github/hub/utils"
"github.com/github/hub/v2/md2roff"
"github.com/github/hub/v2/utils"
"github.com/russross/blackfriday"
)
......
......@@ -14,7 +14,7 @@ find_source_files() {
build_hub() {
mkdir -p "$(dirname "$1")"
go build \
-ldflags "-X github.com/github/hub/version.Version=`./script/version` $LDFLAGS" \
-ldflags "-X github.com/github/hub/v2/version.Version=`./script/version` $LDFLAGS" \
-gcflags "$GCFLAGS" \
-asmflags "$ASMFLAGS" \
-o "$1"
......
......@@ -18,7 +18,7 @@ prepare() {
go tool cover -mode=set -var="LiveCoverage$((++n))" "$f" > "$f"~
sed -E '
/^package /a\
import "github.com/github/hub/coverage"
import "github.com/github/hub/v2/coverage"
s/(LiveCoverage[0-9]+)\.Count\[([0-9]+)\][^;]+/coverage.Record(\1, \2)/g
' < "$f"~ > "$f"
rm "$f"~
......@@ -32,7 +32,7 @@ generate() {
source_files | xargs git checkout --
echo 'mode: count' > "$HUB_COVERAGE"~
sed -E 's!^.+/(github.com/github/hub/)!\1!' "$HUB_COVERAGE" | awk '
sed -E 's!^.+/(github.com/github/hub/v2/)!\1!' "$HUB_COVERAGE" | awk '
{ a[substr($0, 0, length()-2)] += $(NF) }
END { for (k in a) print k, a[k] }
' >> "$HUB_COVERAGE"~
......
......@@ -10,7 +10,7 @@ import (
"strings"
"time"
"github.com/github/hub/ui"
"github.com/github/hub/v2/ui"
"github.com/kballard/go-shellquote"
)
......
package utils
import (
"github.com/github/hub/internal/assert"
"github.com/github/hub/v2/internal/assert"
"testing"
"time"
)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册