Marian Harbach | ebeb154 | 2019-12-13 10:42:46 +0100 | [diff] [blame] | 1 | :linkattrs: |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 2 | = Making a Release of a Gerrit Subproject |
Martin Fick | 21e278e | 2012-02-23 13:45:54 -0700 | [diff] [blame] | 3 | |
Edwin Kempin | bb8e625 | 2012-07-31 14:30:35 +0200 | [diff] [blame] | 4 | [[make-snapshot]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 5 | == Make a Snapshot |
Martin Fick | 21e278e | 2012-02-23 13:45:54 -0700 | [diff] [blame] | 6 | |
Edwin Kempin | bb8e625 | 2012-07-31 14:30:35 +0200 | [diff] [blame] | 7 | * Build the latest snapshot and install it into the local Maven |
| 8 | repository: |
| 9 | + |
Michael Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 10 | ---- |
Edwin Kempin | bb8e625 | 2012-07-31 14:30:35 +0200 | [diff] [blame] | 11 | mvn clean install |
Michael Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 12 | ---- |
Edwin Kempin | bb8e625 | 2012-07-31 14:30:35 +0200 | [diff] [blame] | 13 | |
| 14 | * Test Gerrit with this snapshot locally |
Martin Fick | 21e278e | 2012-02-23 13:45:54 -0700 | [diff] [blame] | 15 | |
| 16 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 17 | == Publish Snapshot |
Martin Fick | 21e278e | 2012-02-23 13:45:54 -0700 | [diff] [blame] | 18 | |
David Pursehouse | 383a318 | 2013-12-06 13:06:57 +0900 | [diff] [blame] | 19 | If a snapshot for a subproject was created that should be referenced by |
| 20 | Gerrit while current Gerrit development is ongoing, this snapshot needs |
Edwin Kempin | bb8e625 | 2012-07-31 14:30:35 +0200 | [diff] [blame] | 21 | to be published. |
Martin Fick | 21e278e | 2012-02-23 13:45:54 -0700 | [diff] [blame] | 22 | |
Edwin Kempin | bb8e625 | 2012-07-31 14:30:35 +0200 | [diff] [blame] | 23 | * Make sure you have done the configuration needed for deployment: |
| 24 | ** link:dev-release-deploy-config.html#deploy-configuration-settings-xml[ |
| 25 | Configuration in Maven `settings.xml`] |
| 26 | ** link:dev-release-deploy-config.html#deploy-configuration-subprojects[ |
| 27 | Configuration for Subprojects in `pom.xml`] |
Martin Fick | 21e278e | 2012-02-23 13:45:54 -0700 | [diff] [blame] | 28 | |
Edwin Kempin | bb8e625 | 2012-07-31 14:30:35 +0200 | [diff] [blame] | 29 | * Deploy the new snapshot: |
| 30 | + |
Michael Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 31 | ---- |
Martin Fick | 21e278e | 2012-02-23 13:45:54 -0700 | [diff] [blame] | 32 | mvn deploy |
Michael Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 33 | ---- |
Martin Fick | 21e278e | 2012-02-23 13:45:54 -0700 | [diff] [blame] | 34 | |
David Pursehouse | 383a318 | 2013-12-06 13:06:57 +0900 | [diff] [blame] | 35 | * Change the `id`, `bin_sha1`, and `src_sha1` values in the `maven_jar` |
Dave Borowitz | 9c35979 | 2017-11-14 08:40:55 -0500 | [diff] [blame] | 36 | for the subproject in `/WORKSPACE` to the `SNAPSHOT` version. |
Edwin Kempin | bb8e625 | 2012-07-31 14:30:35 +0200 | [diff] [blame] | 37 | + |
David Pursehouse | 383a318 | 2013-12-06 13:06:57 +0900 | [diff] [blame] | 38 | When Gerrit gets released, a release of the subproject has to be done |
| 39 | and Gerrit has to reference the released subproject version. |
Martin Fick | 21e278e | 2012-02-23 13:45:54 -0700 | [diff] [blame] | 40 | |
Martin Fick | 21e278e | 2012-02-23 13:45:54 -0700 | [diff] [blame] | 41 | |
Edwin Kempin | bb8e625 | 2012-07-31 14:30:35 +0200 | [diff] [blame] | 42 | [[prepare-release]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 43 | == Prepare the Release |
Edwin Kempin | bb8e625 | 2012-07-31 14:30:35 +0200 | [diff] [blame] | 44 | |
| 45 | * link:#make-snapshot[First create (and test) the latest snapshot for |
David Pursehouse | 383a318 | 2013-12-06 13:06:57 +0900 | [diff] [blame] | 46 | the subproject] |
Martin Fick | 21e278e | 2012-02-23 13:45:54 -0700 | [diff] [blame] | 47 | |
David Pursehouse | 383a318 | 2013-12-06 13:06:57 +0900 | [diff] [blame] | 48 | * Update the top level `pom.xml` in the subproject to reflect |
Edwin Kempin | 67e09dc | 2012-07-23 10:46:06 +0200 | [diff] [blame] | 49 | the new project version (the exact value of the tag you will create |
| 50 | below) |
Martin Fick | 21e278e | 2012-02-23 13:45:54 -0700 | [diff] [blame] | 51 | |
Edwin Kempin | bb8e625 | 2012-07-31 14:30:35 +0200 | [diff] [blame] | 52 | * Create the Release Tag |
| 53 | + |
Michael Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 54 | ---- |
| 55 | git tag -a -m "prolog-cafe 1.3" v1.3 |
| 56 | ---- |
Martin Fick | ec31ff4 | 2012-06-23 11:35:39 -0600 | [diff] [blame] | 57 | |
Edwin Kempin | bb8e625 | 2012-07-31 14:30:35 +0200 | [diff] [blame] | 58 | * Build and install into local Maven repository: |
| 59 | + |
Michael Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 60 | ---- |
Edwin Kempin | bb8e625 | 2012-07-31 14:30:35 +0200 | [diff] [blame] | 61 | mvn clean install |
Michael Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 62 | ---- |
Edwin Kempin | bb8e625 | 2012-07-31 14:30:35 +0200 | [diff] [blame] | 63 | |
| 64 | |
| 65 | [[publish-release]] |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 66 | == Publish the Release |
Edwin Kempin | bb8e625 | 2012-07-31 14:30:35 +0200 | [diff] [blame] | 67 | |
| 68 | * Make sure you have done the configuration needed for deployment: |
| 69 | ** link:dev-release-deploy-config.html#deploy-configuration-settings-xml[ |
| 70 | Configuration in Maven `settings.xml`] |
| 71 | ** Configuration in `pom.xml` for |
David Pursehouse | 383a318 | 2013-12-06 13:06:57 +0900 | [diff] [blame] | 72 | link:dev-release-deploy-config.html#deploy-configuration-subprojects[subprojects] |
Edwin Kempin | bb8e625 | 2012-07-31 14:30:35 +0200 | [diff] [blame] | 73 | |
Martin Fick | 21e278e | 2012-02-23 13:45:54 -0700 | [diff] [blame] | 74 | * Deploy the new release: |
Edwin Kempin | bb8e625 | 2012-07-31 14:30:35 +0200 | [diff] [blame] | 75 | + |
Michael Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 76 | ---- |
David Pursehouse | 652dadb | 2018-12-07 16:43:18 +0900 | [diff] [blame] | 77 | mvn deploy -DperformRelease=true |
Michael Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 78 | ---- |
Edwin Kempin | bb8e625 | 2012-07-31 14:30:35 +0200 | [diff] [blame] | 79 | |
| 80 | * Push the pom change(s) to the project's repository |
| 81 | `refs/for/<master|stable>` |
| 82 | |
| 83 | * Push the Release Tag |
| 84 | + |
Michael Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 85 | ---- |
Edwin Kempin | bb8e625 | 2012-07-31 14:30:35 +0200 | [diff] [blame] | 86 | git push gerrit-review refs/tags/v1.3:refs/tags/v1.3 |
Michael Ochmann | b99feab | 2016-07-06 14:10:22 +0200 | [diff] [blame] | 87 | ---- |
Martin Fick | ec31ff4 | 2012-06-23 11:35:39 -0600 | [diff] [blame] | 88 | |
| 89 | |
| 90 | GERRIT |
| 91 | ------ |
| 92 | Part of link:index.html[Gerrit Code Review] |
Yuxuan 'fishy' Wang | 99cb68d | 2013-10-31 17:26:00 -0700 | [diff] [blame] | 93 | |
| 94 | SEARCHBOX |
| 95 | --------- |