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

Use git describe for finding operator version #500

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,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"
Loading