1
0
mirror of https://github.com/square/okhttp.git synced 2026-10-24 07:59:29 +03:00
Files
okhttp/docs/releasing.md
Tran Ngoc Nhan b5c43cb42a Add Markdown code and fix script indentation (#9790)
* Add Markdown code and fix script indentation

* Update CONTRIBUTING.md

---------

Co-authored-by: Jake Wharton <jw@jakewharton.com>
2026-10-16 22:37:21 -04:00

1.2 KiB

Releasing

  1. Update CHANGELOG.md.

  2. Set versions:

    export RELEASE_VERSION=X.Y.Z
    export NEXT_VERSION=X.Y.Z-SNAPSHOT
    
  3. Update versions, tag the release, and prepare for the next release.

    sed -i "" \
      "s/version = \".*\"/version = \"$RELEASE_VERSION\"/g" \
      build-logic/src/main/kotlin/okhttp.base-conventions.gradle.kts
    sed -i "" \
      "s/\"com.squareup.okhttp3:\([^\:]*\):[^\"]*\"/\"com.squareup.okhttp3:\1:$RELEASE_VERSION\"/g" \
      `find . -name "README.md"`
    sed -i "" \
      "s/\/com.squareup.okhttp3\/\([^\:]*\)\/[^\/]*\//\/com.squareup.okhttp3\/\1\/$RELEASE_VERSION\//g" \
      `find . -name "README.md"`
    
    git commit -am "Prepare for release $RELEASE_VERSION."
    git tag -a parent-$RELEASE_VERSION -m "Version $RELEASE_VERSION"
    git push && git push --tags
    
    sed -i "" \
      "s/version = \".*\"/version = \"$NEXT_VERSION\"/g" \
      build-logic/src/main/kotlin/okhttp.base-conventions.gradle.kts
    git commit -am "Prepare next development version."
    git push
    
  4. Wait for GitHub Actions to build and promote the release.