this is a monorepo managed by Yarn's workspaces feature (https://yarnpkg.com/blog/2017/08/02/introducing-workspaces/).
Documentation for each package can be found in their respective README files.
- if you don't have
yarn
, install it here: https://yarnpkg.com/en/docs/install yarn install
in the veritone-sdk root.- run
yarn buildall
from the veritone-sdk root. This will bundle all the packages so that cross-dependencies can resolve correctly.
This is WIP and may change as we find a better process
- Complete your feature and PR it to the master branch.
- Once merged, update
package.json
in each affected folder under thepackages
directory- Increment the version field using semver
- Update each package's
CHANGELOG
file with your new version- To diff individual packages in git:
git diff <hash of previous release> -- packages/<packagename>
- If there's a backlog of unreleased code, Yours may not be the only changes in the release! If that's the case, talk with each code author to get changelog entries from them.
- To diff individual packages in git:
- Commit the
package.json
andCHANGELOG
changes (only!) to master. - Tag the commit as a release. Create a release for each package you updated, being sure to set the release target to the correct commit, and using the naming scheme:
- Tag version: version-packagename, ie.
1.0.0-veritone-client-js
- Release title: packagename vVersion, ie. veritone-client-js v1.0.0
- Tag version: version-packagename, ie.
- On your local machine, checkout the
master
branch andgit pull
. - Run
yarn --force
from the root directory. - Run
yarn buildall
from the root directory. - Run
yarn publish
in each package directory as needed to push your release to NPM.
See packages/veritone-json-schema/README.md
Occasionally you may need to integrate unfinished work on an SDK package with another project. In cases where that project must be deployed or shared, we cannot rely on yarn link
. Rather than cluttering our ecosystem with with prerelease package versions, you can publish a tar archive to an S3 bucket and reference that archive in the package.json of your project (using yarn's ability to download tarball dependencies).
- Obtain S3 user permissions to PUT to the
dev-sdk-build-artifacts
bucket. - Make changes to an SDK package locally. The changes do not need to be pushed or even committed. The only requirement is that the SDK package can be built.
- From the veritone-sdk root directory, run
yarn publish-dev <packageName>
. ie.yarn publish-dev veritone-react-common
- Copy the resulting s3 resource url, ie. https://dev-sdk-build-artifacts.s3.amazonaws.com/veritone-react-common-[timestamp].tar.gz
- Reference the s3 url in the package.json of your sdk-using project. ie.
{
"dependencies": {
...,
"veritone-react-common": "https://dev-sdk-build-artifacts.s3.amazonaws.com/veritone-react-common-[timestamp].tar.gz",
...
}
}
- run
yarn install
in your project to pull in the new dependency.
Copyright 2019, Veritone Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.