How to automatically update Android: versionName?

To improve error correction, I would like the android:versionName automatically contain the version number on the svn server. Does anyone know how to do this? Thanks

`

+4
source share
2 answers
+2
source

You can use start-commit hook , which writes the current timestamp in android: versionName in the manifest. You need to write a small script that uses some regex to insert the current timestamp into AndroidManifest.xml and then call it like a hook to commit

The verified version number is not yet known for hook-start-commit, so you cannot write it to the manifest.

I did not use these hooks myself. As far as I understand, you can create the /repoName/.svn/hook/ directory, and inside it you create one or more executable files, for example. "start-commit" does what you want.

This seems like a good starting point if you want to know more about the hooks: Subversion Confirmation Hook

+1
source

Source: https://habr.com/ru/post/1313272/


All Articles