mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 10:27:46 +08:00
fix: kubo in AgentVersion
This commit is contained in:
parent
c9b8fbdbef
commit
4c965fc603
@ -16,7 +16,7 @@ test_id_compute_agent() {
|
||||
else
|
||||
AGENT_COMMIT="${AGENT_COMMIT##$AGENT_VERSION-}"
|
||||
fi
|
||||
AGENT_VERSION="go-ipfs/$AGENT_VERSION/$AGENT_COMMIT"
|
||||
AGENT_VERSION="kubo/$AGENT_VERSION/$AGENT_COMMIT"
|
||||
if test -n "$AGENT_SUFFIX"; then
|
||||
if test -n "$AGENT_COMMIT"; then
|
||||
AGENT_VERSION="$AGENT_VERSION/"
|
||||
|
||||
@ -24,7 +24,7 @@ test_ls_cmd() {
|
||||
printf "Access-Control-Allow-Headers: X-Stream-Output, X-Chunked-Output, X-Content-Length\r\n" >>expected_output &&
|
||||
printf "Access-Control-Expose-Headers: X-Stream-Output, X-Chunked-Output, X-Content-Length\r\n" >>expected_output &&
|
||||
printf "Content-Type: text/plain\r\n" >>expected_output &&
|
||||
printf "Server: go-ipfs/%s\r\n" $(ipfs version -n) >>expected_output &&
|
||||
printf "Server: kubo/%s\r\n" $(ipfs version -n) >>expected_output &&
|
||||
printf "Trailer: X-Stream-Error\r\n" >>expected_output &&
|
||||
printf "Vary: Origin\r\n" >>expected_output &&
|
||||
printf "X-Chunked-Output: 1\r\n" >>expected_output &&
|
||||
@ -47,7 +47,7 @@ test_ls_cmd() {
|
||||
printf "Access-Control-Allow-Headers: X-Stream-Output, X-Chunked-Output, X-Content-Length\r\n" >>expected_output &&
|
||||
printf "Access-Control-Expose-Headers: X-Stream-Output, X-Chunked-Output, X-Content-Length\r\n" >>expected_output &&
|
||||
printf "Content-Type: application/json\r\n" >>expected_output &&
|
||||
printf "Server: go-ipfs/%s\r\n" $(ipfs version -n) >>expected_output &&
|
||||
printf "Server: kubo/%s\r\n" $(ipfs version -n) >>expected_output &&
|
||||
printf "Trailer: X-Stream-Error\r\n" >>expected_output &&
|
||||
printf "Vary: Origin\r\n" >>expected_output &&
|
||||
printf "X-Chunked-Output: 1\r\n" >>expected_output &&
|
||||
|
||||
@ -13,13 +13,13 @@ var CurrentCommit string
|
||||
// CurrentVersionNumber is the current application's version literal
|
||||
const CurrentVersionNumber = "0.14.0-dev"
|
||||
|
||||
const ApiVersion = "/go-ipfs/" + CurrentVersionNumber + "/"
|
||||
const ApiVersion = "/kubo/" + CurrentVersionNumber + "/"
|
||||
|
||||
// GetUserAgentVersion is the libp2p user agent used by go-ipfs.
|
||||
//
|
||||
// Note: This will end in `/` when no commit is available. This is expected.
|
||||
func GetUserAgentVersion() string {
|
||||
userAgent := "go-ipfs/" + CurrentVersionNumber + "/" + CurrentCommit
|
||||
userAgent := "kubo/" + CurrentVersionNumber + "/" + CurrentCommit
|
||||
if userAgentSuffix != "" {
|
||||
if CurrentCommit != "" {
|
||||
userAgent += "/"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user