modified some logic
This commit is contained in:
parent
ec715880e0
commit
ab20ca8622
@ -107,6 +107,10 @@ public class PlanSpec {
|
||||
return new Job("Create Release", new BambooKey("CRLS"))
|
||||
.tasks(
|
||||
new VcsCheckoutTask().description("Checkout Default Repository").checkoutItems(new CheckoutItem().defaultRepository()),
|
||||
new ScriptTask().description("Build")
|
||||
.location(ScriptTaskProperties.Location.FILE)
|
||||
.fileFromPath("bamboo-specs/src/main/resources/scripts/update-version.sh")
|
||||
.environmentVariables("BRANCH_NAME=\"${bamboo.planRepository.branchName}\""),
|
||||
new InjectVariablesTask().path("version.properties"),
|
||||
new VcsBranchTask().branchName("release/\"${APP_VERSION}\"").repository("RED / ui"))
|
||||
.dockerConfiguration(new DockerConfiguration().image("nexus.iqser.com:5001/infra/release_build:2.9.1")
|
||||
|
||||
19
bamboo-specs/src/main/resources/scripts/update-version.sh
Executable file
19
bamboo-specs/src/main/resources/scripts/update-version.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ "${BRANCH_NAME}" == "master" ]]
|
||||
then
|
||||
./versions.sh minor
|
||||
echo "Updating minor version ... "
|
||||
fi
|
||||
|
||||
|
||||
if [[ "${BRANCH_NAME}" == release* ]]
|
||||
then
|
||||
./versions.sh patch
|
||||
echo "Updating patch version ... "
|
||||
fi
|
||||
|
||||
|
||||
version=$(jq -r '.version' < package.json)
|
||||
|
||||
echo "At version ${version}"
|
||||
Loading…
x
Reference in New Issue
Block a user