Steps to make a new adjust Android release
-
Make all changes you intend to include in PR.
-
Do that on SEPARATE branch (not on master).
-
After you have finished changing source files, make sure that you change all files which contain occurence of current version and to replace those occurences with new version number. In order to check all files which contain occurence of current version (for example v4.0.5) run this command inside repository root folder:
ag -i 4.0.5
You will get list of files which contain this phrase. Edit each one of them and replace it with new version number (for example 4.0.6).
-
If you made changes to these files, add it to PR as well.
At this point, you are ready to merge PR into master branch, but we're gonna make preparations for Maven repository update.
-
Go to folder in repository which contains pom.xml file.
-
Make sure following two commands execute successfully:
mvn clean mvn package
After you have executed this, you should have your newly generated .jar files in target folder.
-
Copy your pom.xml file into target folder and rename it to "adjust-android-X.X.X.pom".
-
Now you need to sign all .jar files and newly copied .pom file. In order to do that, perform following commands:
gpg -ab adjust-android-X.X.X.jar gpg -ab adjust-android-X.X.X-javadoc.jar gpg -ab adjust-android-X.X.X-sources.jar gpg -ab adjust-android-X.X.X.pom
After you have successfully completed these actions, you will see that you have 4 newly generated files with .asc extension:
adjust-android-X.X.X.jar.asc adjust-android-X.X.X-javadoc.jar.asc adjust-android-X.X.X-sources.jar.asc adjust-android-X.X.X.pom.asc
-
Now we need to merge all these files into a bundle which we need to upload to Maven repository. In order to do that, perform following command:
jar -cvf bundle.jar adjust-android-4.0.6.pom adjust-android-4.0.6.pom.asc adjust-android-4.0.6.jar adjust-android-4.0.6.jar.asc adjust-android-4.0.6-javadoc.jar adjust-android-4.0.6-javadoc.jar.asc adjust-android-4.0.6-sources.jar adjust-android-4.0.6-sources.jar.asc or if you just don't want to type as much: jar -cvf bundle.jar adjust-android-X.X.X*
After this step you will have bundle.jar in current folder and we can proceed with uploading it to Maven repository.
-
Go to https://oss.sonatype.org/ and login.
-
Under Build Promotions on the left, choose Staging Upload.
-
Choose Artifact Bundle as Upload Mode.
-
Press Select Bundle to Upload and choose our generated bundle.jar and press Upload Bundle.
Bundle is now in staging and we will release it after we make official release on github page. Back to github and console line!
-
Merge your PR into master!
-
Checkout master branch and rebase.
-
Add the tag for new version. In order to do that, perform following command: git tag -a v4.0.6 -m "Version v4.0.6"
-
Push tag to remote repository! In order to do that, perform following command: git push origin --tags
-
Go to github releases page and Draft a new release! Write down the title, what's new in it and which PRs are linked to it.
-
Choose to add files to new release and attach following two files: adjust-android-X.X.X-sources.jar adjust-android-X.X.X.jar
-
Release it!
-
Under Build Promotion choose Staging Repositories. Sort them by date, or how ever you want, but just find the newest one which is in staging state.
-
Select it and choose Release!