Skip to content

Commit

Permalink
Merge pull request #500 from rhmdnd/fix-version-script
Browse files Browse the repository at this point in the history
Use git describe for finding operator version
  • Loading branch information
openshift-merge-bot[bot] authored May 30, 2024
2 parents 893ea06 + 0265d4e commit e4660fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ package-version-to-tag: check-operator-version ## Explicitly override $TAG with
.PHONY: git-release
git-release: fetch-git-tags package-version-to-tag changelog ## Update project files with new version information.
git checkout -b "release-v$(TAG)"
sed -i "s/\(replaces: \).*/\1$(PREVIOUS_VERSION)/" $(BUNDLE_CSV_FILE)
sed -i "s/\(replaces: \).*/\1$(APP_NAME).$(PREVIOUS_VERSION)/" $(BUNDLE_CSV_FILE)
sed -i "s/\(.*Version = \"\).*/\1$(TAG)\"/" version/version.go
sed -i "s/\(.*VERSION?=\).*/\1$(TAG)/" version.Makefile
git add version* bundle CHANGELOG.md config/manifests/bases
Expand Down
5 changes: 1 addition & 4 deletions utils/get-current-version.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#!/bin/bash

ROOT_DIR=$(git rev-parse --show-toplevel)
CSV="$ROOT_DIR/bundle/manifests/compliance-operator.clusterserviceversion.yaml"

OLD_VERSION=$(yq '.spec.version' "$CSV")
OLD_VERSION=$(git describe --tags --abbrev=0)
echo "$OLD_VERSION"

0 comments on commit e4660fe

Please sign in to comment.