mirror of
https://github.com/square/okhttp.git
synced 2025-11-24 18:41:06 +03:00
Combine the marketing page (index.md) with the GitHub README.md. Fix links pointing to 3.x documentation. Use Markdown tables instead of HTML tables.
48 lines
1.2 KiB
Markdown
48 lines
1.2 KiB
Markdown
Releasing
|
|
=========
|
|
|
|
1. Update `CHANGELOG.md`.
|
|
|
|
2. Set versions:
|
|
|
|
```
|
|
export RELEASE_VERSION=X.Y.Z
|
|
export NEXT_VERSION=X.Y.Z-SNAPSHOT
|
|
```
|
|
|
|
3. Update, build, and upload:
|
|
|
|
```
|
|
sed -i "" \
|
|
"s/VERSION_NAME=.*/VERSION_NAME=$RELEASE_VERSION/g" \
|
|
gradle.properties
|
|
sed -i "" \
|
|
"s/\"com.squareup.okhttp3:\([^\:]*\):[^\"]*\"/\"com.squareup.okhttp3:\1:$RELEASE_VERSION\"/g" \
|
|
`find . -name "README.md"`
|
|
./gradlew clean uploadArchives
|
|
```
|
|
|
|
4. Visit [Sonatype Nexus](https://oss.sonatype.org/) to promote the artifact. Or drop it if there is a problem!
|
|
|
|
5. Tag the release, prepare for the next one, and push to GitHub.
|
|
|
|
```
|
|
git commit -am "Prepare for release $RELEASE_VERSION."
|
|
git tag -a parent-$RELEASE_VERSION -m "Version $RELEASE_VERSION"
|
|
sed -i "" \
|
|
"s/VERSION_NAME=.*/VERSION_NAME=$NEXT_VERSION/g" \
|
|
gradle.properties
|
|
git commit -am "Prepare next development version."
|
|
git push && git push --tags
|
|
```
|
|
|
|
|
|
Prerequisites
|
|
-------------
|
|
|
|
In `~/.gradle/gradle.properties`, set the following:
|
|
|
|
* `SONATYPE_NEXUS_USERNAME` - Sonatype username for releasing to `com.squareup`.
|
|
* `SONATYPE_NEXUS_PASSWORD` - Sonatype password for releasing to `com.squareup`.
|
|
|