Skip to contentSkip to conversation

scripts/release: Use "v" prefix for main release tag

PATCH New Petr Lautrbach 1 participant 1 message Nov 24 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts/release: Use "v" prefix for main release tag

With this change, the new release tags will be prefixed with "v" - "v3.12". This allows us to use later release branch "3.12" if there's a demand to backport some important fixes and do a fast release, see
https://github.com/SELinuxProject/selinux/wiki/Release-Process

---
 scripts/release | 29 +++++++++++++++--------------
 1 file changed, 15 insertions(+), 14 deletions(-)
scripts/release +15 -14
index 94125a7acd0d..3549da9209d3 100755
@@ -12,8 +12,9 @@ if ! [ -d "$WIKIDIR" ]; then
 	git clone [email protected]:SELinuxProject/selinux.wiki.git "$WIKIDIR"
 fi
 
-RELEASE_TAG="$(cat VERSION)"
-DEST="releases/$RELEASE_TAG"
+RELEASE="$(cat VERSION)"
+RELEASE_TAG="v$RELEASE"
+DEST="releases/$RELEASE"
 DIRS=(
 	checkpolicy
 	libselinux
@@ -31,9 +32,9 @@ DIRS=(
 )
 
 if git rev-parse "$RELEASE_TAG" &> /dev/null ; then
-	echo "Warning: tag $RELEASE_TAG already exists"
+	echo "Warning: tag v$RELEASE_TAG already exists"
 else
-	git tag -a "$RELEASE_TAG" -m "Release $RELEASE_TAG"
+	git tag -a "$RELEASE_TAG" -m "Release $RELEASE"
 fi
 
 rm -rf "$DEST"
@@ -52,22 +53,22 @@ for COMPONENT in "${DIRS[@]}"; do
 	gpg -b -a "$DEST/$TAG.tar.gz"
 done
 
-git archive -o "$DEST/selinux-${RELEASE_TAG}.tar.gz" --prefix="selinux-${RELEASE_TAG}/" "${RELEASE_TAG}"
-gpg -b -a "$DEST/selinux-${RELEASE_TAG}.tar.gz"
+git archive -o "$DEST/selinux-${RELEASE}.tar.gz" --prefix="selinux-${RELEASE}/" "${RELEASE_TAG}"
+gpg -b -a "$DEST/selinux-${RELEASE}.tar.gz"
 
 echo "Add the following to the $WIKIDIR/Releases.md wiki page:"
 
 echo ""
 
-echo "## Release $RELEASE_TAG"
+echo "## Release $RELEASE"
 
 echo ""
 
-echo "[Release Notes](https://github.com/SELinuxProject/selinux/releases/download/$RELEASE_TAG/RELEASE-$RELEASE_TAG.txt)"
+echo "[Release Notes](https://github.com/SELinuxProject/selinux/releases/download/$RELEASE/RELEASE-$RELEASE.txt)"
 echo ""
-echo "[full log](https://github.com/SELinuxProject/selinux/releases/download/$RELEASE_TAG/log-$RELEASE_TAG.txt)"
+echo "[full log](https://github.com/SELinuxProject/selinux/releases/download/$RELEASE/log-$RELEASE.txt)"
 echo ""
-echo "[short log](https://github.com/SELinuxProject/selinux/releases/download/$RELEASE_TAG/shortlog-$RELEASE_TAG.txt)"
+echo "[short log](https://github.com/SELinuxProject/selinux/releases/download/$RELEASE/shortlog-$RELEASE.txt)"
 echo ""
 
 for COMPONENT in "${DIRS[@]}"; do
@@ -75,7 +76,7 @@ for COMPONENT in "${DIRS[@]}"; do
 	VERS="$(cat "$DIR/VERSION")"
 	TAG="$COMPONENT-$VERS"
 	tarball="$TAG.tar.gz"
-	echo -n "[$tarball](https://github.com/SELinuxProject/selinux/releases/download/$RELEASE_TAG/$tarball) "
+	echo -n "[$tarball](https://github.com/SELinuxProject/selinux/releases/download/$RELEASE/$tarball) "
 	sha256sum "$DEST/$tarball" | cut -d " " -f 1
 	echo ""
 done
@@ -84,13 +85,13 @@ echo "### Source repository snapshot"
 
 echo ""
 
-echo -n "[selinux-${RELEASE_TAG}.tar.gz](https://github.com/SELinuxProject/selinux/releases/download/$RELEASE_TAG/selinux-${RELEASE_TAG}.tar.gz) "
-sha256sum "$DEST/selinux-${RELEASE_TAG}.tar.gz" | cut -d " " -f 1
+echo -n "[selinux-${RELEASE}.tar.gz](https://github.com/SELinuxProject/selinux/releases/download/$RELEASE/selinux-${RELEASE}.tar.gz) "
+sha256sum "$DEST/selinux-${RELEASE}.tar.gz" | cut -d " " -f 1
 echo ""
 
 echo "And then run:"
 echo "  cd $WIKIDIR"
-echo "  git commit  -m \"Release $RELEASE_TAG\" -a -s"
+echo "  git commit  -m \"Release $RELEASE\" -a -s"
 echo "  git push"
 
 echo ""
Signature · 1 line
2.56.1