Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actions rewrite the property files, comments and formatting are removed #2

Open
dapicester opened this issue Sep 25, 2020 · 4 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@dapicester
Copy link

I am using the set_properties_value and increment_version_code_in_properties_file. The values got correctly updated but the actions deleted all the formatting (empty lines) and comments in the properties file. That is unexpected to me.

My expectation is that the actions set only the given properties, without any further modification to the file.

@Kerizer Kerizer added bug Something isn't working enhancement New feature or request labels Sep 26, 2020
@jacklebbos
Copy link

up

@dapicester
Copy link
Author

FYI I have replaced this plugin with some code to read and increment the version and then call sed to replace the lines I need.

@jacklebbos
Copy link

Can you show me an example please?

@dapicester
Copy link
Author

Something like this:

lane :update_version do
  version = get_version # this is where I get the current version and increment it
  sh "sed -i '' 's/^VERSION_NAME=.*/VERSION_NAME=#{version}/' ../android/gradle.properties"
end

I also suggest you look into how to use sed on the command line for this kind of tasks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants