- Register your own application on Dropbox's developer site for each required application type.
- Place application keys into the file.
Place JSON file named toolbox.appkeys
under resources
folder, then run or compile binaries.
toolbox.appkeys
file format is like below:
{
"user_full.key": "xxxxxxxxxxxxxx",
"user_full.secret": "xxxxxxxxxxxxxx",
"business_info.key": "xxxxxxxxxxxxxx",
"business_info.secret": "xxxxxxxxxxxxxx",
"business_file.key": "xxxxxxxxxxxxxx",
"business_file.secret": "xxxxxxxxxxxxxx",
"business_management.key": "xxxxxxxxxxxxxx",
"business_management.secret": "xxxxxxxxxxxxxx",
"business_audit.key": "xxxxxxxxxxxxxx",
"business_audit.secret": "xxxxxxxxxxxxxx"
}
TOOLBOX_APPKEYS
:
TOOLBOX_APPKEYS is for define app keys and app secrets of web services.
{"user_full.key":"xxxxxxxxxxxxxx","user_full.secret":"xxxxxxxxxxxxxx","business_info.key":"xxxxxxxxxxxxxx","business_info.secret":"xxxxxxxxxxxxxx","business_file.key":"xxxxxxxxxxxxxx","business_file.secret":"xxxxxxxxxxxxxx","business_management.key":"xxxxxxxxxxxxxx","business_management.secret":"xxxxxxxxxxxxxx","business_audit.key":"xxxxxxxxxxxxxx","business_audit.secret":"xxxxxxxxxxxxxx"}
TOOLBOX_BUILDERKEY
:
TOOLBOX_BUILDERKEY is for the seed to obfuscate secrets. Please choose random string
TOOLBOX_DEPLOY_TOKEN
:
TOOLBOX_DEPLOY_TOKEN is for deploy compiled packages into Dropbox.
Please run tbx dev ci artifact connect
command to create token data.
TOOLBOX_REPLAY_URL
:
TOOLBOX_REPLAY_URL is for retrieve replay data from the shared link.
TOOLBOX_BUILD_TARGET
:
TOOLBOX_BUILD_TARGET is for specify build target. The build target is the combination of os/arch like windows/amd64, darwin/amd64, linux/amd64, etc.
To build an executable, please use Docker like below.
$ docker-compose -f docker-compose.yml build && docker-compose -f docker-compose.yml run build
Most documents are generated by the command dev doc
. And most text resources are managed under resource
file /resources/messages.json
.
For example, README.md
, on top of this project, is also generated from the template
/resources/README.tmpl.md
. And related text are managed with key prefix doc.readme
.
toolbox rely on message resource file to internationalize all texts and UI messages. Therefore all message required to
add into the resource file (/resources/messages.json
).
To minimize code configuration, there is a naming convention & framework for typical messages. For example, keys for
recipes and their value objects are automatically mapped based on their type package name, type name, and field names.
If there a recipe named file/Copy.go
, and the value object file/CopyVO
. Then those names are mapped
into file.copy.<key>
, and file.copy_vo.<key>
.
Please run command dev build preflight
to ensure all message resources and documents are available.
$ cd /path/to/PROJECT_ROOT
$ go run tbx.go dev build preflight
Please run below command to prepare end to end testing. Tests should pass without this step.
$ cd /path/to/PROJECT_ROOT
$ go run tbx.go dev ci auth connect
To run all tests, please reduce concurrency to 1. Because some test are stateful for Dropbox accounts.
$ cd /path/to/PROJECT_ROOT
$ go test -p 1 ./...
Update following files
- resources/release/release ... Release number
- resources/release/release_notes ... Release notes
Please run command dev release candidate
to verify & update resources for release ready.
$ cd /path/to/PROJECT_ROOT
$ go run tbx.go dev release candidate
Please run command dev release publish
to upload assets on to the github account, and create draft releases.
$ cd /path/to/PROJECT_ROOT
$ go run tbx.go dev release publish
$ docker run --rm --volume="$(pwd):/srv/jekyll" -p 4000:4000 jekyll/jekyll:stable jekyll serve --config /srv/jekyll/docs/_config.yml,/srv/jekyll/docs/_config_dev.yml --destination /tmp/staging --source /srv/jekyll/docs --watch