Skip to content

Commit

Permalink
Add a script to branch candlepin
Browse files Browse the repository at this point in the history
  • Loading branch information
ekohl committed Aug 2, 2024
1 parent 2332140 commit 67711bc
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions branch-candlepin
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

CANDLEPIN_VERSION=$1

if [[ -z $CANDLEPIN_VERSION ]] ; then
echo "Usage: $0 CANDLEPIN_VERSION"
exit 1
fi

set -e

sed -e "/candlepin_version/ s/nightly/${CANDLEPIN_VERSION}/" \
-e "/packaging_branch/ s/develop/${CANDLEPIN_VERSION}/" \
theforeman.org/pipelines/vars/candlepin/nightly.groovy > "theforeman.org/pipelines/vars/candlepin/${CANDLEPIN_VERSION}.groovy"
git add "theforeman.org/pipelines/vars/candlepin/${CANDLEPIN_VERSION}.groovy"

echo "- '${CANDLEPIN_VERSION}'" >> theforeman.org/yaml/includes/candlepin_versions.yaml.inc
git add theforeman.org/yaml/includes/candlepin_versions.yaml.inc

sed -i "/nightly/i \ \ \ \ \ \ - '${CANDLEPIN_VERSION}'" centos.org/jobs/candlepin-pipelines.yml
git add centos.org/jobs/candlepin-pipelines.yml

0 comments on commit 67711bc

Please sign in to comment.