Text file src/cmd/go/testdata/script/mod_get_pseudo.txt

     1  env GO111MODULE=on
     2  
     3  [!git] skip
     4  [short] skip
     5  
     6  # Testing git->module converter's generation of +incompatible tags; turn off proxy.
     7  env GOPROXY=direct
     8  env GOSUMDB=off
     9  
    10  # We can resolve the @master branch without unshallowing the local repository
    11  # (even with older gits), so try that before we do anything else.
    12  # (This replicates https://golang.org/issue/26713 with git 2.7.4.)
    13  go get vcs-test.golang.org/git/legacytest.git@master
    14  go list -m all
    15  stdout '^vcs-test.golang.org/git/legacytest.git v2\.0\.1-0\.\d{14}-7303f7796364\+incompatible$'
    16  
    17  # get should include incompatible tags in "latest" calculation.
    18  go mod edit -droprequire vcs-test.golang.org/git/legacytest.git
    19  go get vcs-test.golang.org/git/legacytest.git@latest
    20  go list
    21  go list -m all
    22  stdout '^vcs-test.golang.org/git/legacytest.git v2\.0\.0\+incompatible$'
    23  
    24  # v2.0.1-0.pseudo+incompatible
    25  go get ...test.git@7303f77
    26  go list -m all
    27  stdout '^vcs-test.golang.org/git/legacytest.git v2\.0\.1-0\.\d{14}-7303f7796364\+incompatible$'
    28  
    29  # v2.0.0+incompatible by tag+incompatible
    30  go get ...test.git@v2.0.0+incompatible
    31  go list -m all
    32  stdout '^vcs-test.golang.org/git/legacytest.git v2\.0\.0\+incompatible$'
    33  
    34  # v2.0.0+incompatible by tag
    35  go get ...test.git@v2.0.0
    36  go list -m all
    37  stdout '^vcs-test.golang.org/git/legacytest.git v2\.0\.0\+incompatible$'
    38  
    39  # v2.0.0+incompatible by hash (back on master)
    40  go get ...test.git@d7ae1e4
    41  go list -m all
    42  stdout '^vcs-test.golang.org/git/legacytest.git v2\.0\.0\+incompatible$'
    43  
    44  # v1.2.1-0.pseudo
    45  go get ...test.git@d2d4c3e
    46  go list -m all
    47  stdout '^vcs-test.golang.org/git/legacytest.git v1\.2\.1-0\.\d{14}-d2d4c3ea6623$'
    48  
    49  # v1.2.0
    50  go get ...test.git@9f6f860
    51  go list -m all
    52  stdout '^vcs-test.golang.org/git/legacytest.git v1\.2\.0$'
    53  
    54  # v1.1.0-pre.0.pseudo
    55  go get ...test.git@fb3c628
    56  go list -m all
    57  stdout '^vcs-test.golang.org/git/legacytest.git v1\.1\.0-pre\.0\.\d{14}-fb3c628075e3$'
    58  
    59  # v1.1.0-pre (no longer on master)
    60  go get ...test.git@731e3b1
    61  go list -m all
    62  stdout '^vcs-test.golang.org/git/legacytest.git v1\.1\.0-pre$'
    63  
    64  # v1.0.1-0.pseudo
    65  go get ...test.git@fa4f5d6
    66  go list -m all
    67  stdout '^vcs-test.golang.org/git/legacytest.git v1\.0\.1-0\.\d{14}-fa4f5d6a71c6$'
    68  
    69  # v1.0.0
    70  go get ...test.git@7fff7f3
    71  go list -m all
    72  stdout '^vcs-test.golang.org/git/legacytest.git v1\.0\.0$'
    73  
    74  # v0.0.0-pseudo
    75  go get ...test.git@52853eb
    76  go list -m all
    77  stdout '^vcs-test.golang.org/git/legacytest.git v0\.0\.0-\d{14}-52853eb7b552$'
    78  
    79  -- go.mod --
    80  module x
    81  -- x.go --
    82  package x
    83  import "vcs-test.golang.org/git/legacytest.git"
    84  

View as plain text