I have one javascript file in my bit bucket repo. I want to update only one line in js file during bamboo build.
Example :
version.js
myVersion="alt-1"
.......
During the bamboo build, I want to change the value of myVersion variable .
Hi @Prahaladsinh Rathod ,
You can use sed.
For example in a script:
sed -i 's|myVersion="alt-1"|myVersion="alt-2"|' version.js
and use variables instead of the hardcoded values of alt-1 and alt-2.
@Edwin Kyalangalilwa
Thanks for the reply.
But I have to commit in bitbucket repository using git command.
Like : https://confluence.atlassian.com/bamkb/how-to-commit-and-push-to-a-git-repo-during-a-build-720641378.html
In my bitbucket repository, the version.js file is already there. I just want to update one line during the bamboo build process
@Prahaladsinh Rathod ,
Are you looking to make the edit before pushing to Bitbucket or when the repository is checked out?
Yes, I want to edit before the source code checkout
It looks like you're new here. Sign in or register to get started.