Skip to content

Commit 54dda64

Browse files
author
Rajat Goel
authored
Merge pull request #80 from dropbox/new-release
Add v6 to module path
2 parents 88524a5 + 79b0eb4 commit 54dda64

File tree

37 files changed

+79
-76
lines changed

37 files changed

+79
-76
lines changed

generator/generate-sdk.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
11
#! /usr/bin/env bash
22
set -euo pipefail
33

4-
if [[ $# -gt 1 ]]; then
4+
if [[ $# -ne 1 ]]; then
55
echo "$0: Not expecting more than one command-line argument, got $#." 1>&2
66
exit 1
77
fi
88

9+
version=$(echo $1 | cut -f1 -d'.')
910
loc=$(realpath -e $0)
1011
base_dir=$(dirname "$loc")
1112
spec_dir="$base_dir/dropbox-api-spec"
12-
gen_dir=$(dirname ${base_dir})/dropbox
13+
gen_dir=$(dirname ${base_dir})/v$version/dropbox
1314

1415
stone -v -a :all go_types.stoneg.py "$gen_dir" "$spec_dir"/*.stone
1516
stone -v -a :all go_client.stoneg.py "$gen_dir" "$spec_dir"/*.stone
1617

1718
# Update SDK and API spec versions
18-
sdk_version=${1:-"5.0.0"}
19+
sdk_version=${1}
1920
pushd ${spec_dir}
2021
spec_version=$(git rev-parse --short HEAD)
2122
popd
2223

2324
sed -i.bak -e "s/UNKNOWN SDK VERSION/${sdk_version}/" \
2425
-e "s/UNKNOWN SPEC VERSION/${spec_version}/" ${gen_dir}/sdk.go
2526
rm ${gen_dir}/sdk.go.bak
27+
pushd ${gen_dir}
2628
goimports -l -w ${gen_dir}
29+
popd

dropbox/account/client.go renamed to v6/dropbox/account/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ import (
2626
"io/ioutil"
2727
"net/http"
2828

29-
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
30-
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth"
29+
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
30+
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/auth"
3131
)
3232

3333
// Client interface describes all routes in this namespace

dropbox/account/types.go renamed to v6/dropbox/account/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ package account
2424
import (
2525
"encoding/json"
2626

27-
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
27+
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
2828
)
2929

3030
// PhotoSourceArg : has no documentation (yet)

dropbox/async/types.go renamed to v6/dropbox/async/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ package async
2424
import (
2525
"encoding/json"
2626

27-
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
27+
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
2828
)
2929

3030
// LaunchResultBase : Result returned by methods that launch an asynchronous

dropbox/auth/client.go renamed to v6/dropbox/auth/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
"io/ioutil"
2727
"net/http"
2828

29-
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
29+
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
3030
)
3131

3232
// Client interface describes all routes in this namespace

dropbox/auth/sdk.go renamed to v6/dropbox/auth/sdk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"net/http"
77
"strconv"
88

9-
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
9+
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
1010
)
1111

1212
// AuthAPIError wraps AuthError

dropbox/auth/types.go renamed to v6/dropbox/auth/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ package auth
2424
import (
2525
"encoding/json"
2626

27-
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
27+
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
2828
)
2929

3030
// AccessError : Error occurred because the account doesn't have permission to

dropbox/check/client.go renamed to v6/dropbox/check/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ import (
2626
"io/ioutil"
2727
"net/http"
2828

29-
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
30-
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/auth"
29+
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
30+
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/auth"
3131
)
3232

3333
// Client interface describes all routes in this namespace
File renamed without changes.

dropbox/common/types.go renamed to v6/dropbox/common/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ package common
2424
import (
2525
"encoding/json"
2626

27-
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox"
27+
"github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox"
2828
)
2929

3030
// PathRoot : has no documentation (yet)

0 commit comments

Comments
 (0)