Content Atom Model Definition
This is the Thrift definition of the Content Atom model, and the published versions of this repository are built from the autogenerated code in various languages.
Adding a new atom type
In order for the scala code generated from the thrift definitions to be packaged correctly a scala namespace needs to be included. For example for the chart atom this would be: #@namespace scala com.gu.contentatom.thrift.atom.chart
How to release
Prior to releasing, you will need to ensure that:
tsc
is installed on your machine (e.g.brew install typescript
)npm
is installed on your machine- you have an NPM account which is part of the @guardian org
- you have configured an NPM access token to publish to @guardian; a convenient way to set this up is to execute
npm login
locally and follow the prompts; this will create/append to an~/.npmrc
file with the sufficient config - you have the followed the guide for publishing to Maven and Sonatype
To release to Maven Central:
release cross
This will release 3 artifacts:
content-atom-model-thrift-$version.jar
contains only the Thrift filescontent-atom-model_2.13-$version.jar
contains the Thrift files and Scrooge-generated Scala 2.13 classescontent-atom-model_2.12-$version.jar
contains the Thrift files and Scrooge-generated Scala 2.12 classescontent-atom-model_2.11-$version.jar
contains the Thrift files and Scrooge-generated Scala 2.11 classes
To release to NPM:
project typescriptClasses
releaseNpm <version released to Maven>
To cross release locally use
$ sbt '+publishLocal'