File: release

package info (click to toggle)
android-platform-external-libselinux 8.1.0%2Br23-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 33,252 kB
  • sloc: ansic: 142,533; python: 23,929; makefile: 1,760; yacc: 1,367; sh: 1,108; lex: 448; xml: 176
file content (62 lines) | stat: -rwxr-xr-x 1,426 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/bash

PWD=`pwd`
WIKIDIR=../selinux.wiki

if [ \! -d $WIKIDIR ]; then
    git clone git@github.com:SELinuxProject/selinux.wiki.git $WIKIDIR
fi

DEST=$WIKIDIR/files/releases/$(date '+%Y%m%d')
DIRS="libsepol libselinux libsemanage checkpolicy secilc policycoreutils mcstrans restorecond semodule-utils"
DIRS_NEED_PREFIX="dbus gui python sandbox"

git tag -a $(date '+%Y%m%d') -m "Release $(date '+%Y%m%d')"

rm -rf $DEST
mkdir -p $DEST

for i in $DIRS; do
	cd $i
	VERS=`cat VERSION`
	ARCHIVE=$i-$VERS.tar.gz
	git tag $i-$VERS > /dev/null 2>&1
	git archive --format=tar --prefix=$i-$VERS/ $i-$VERS | gzip > ../$DEST/$ARCHIVE
	cd ..
done

for i in $DIRS_NEED_PREFIX; do
	cd $i
	VERS=`cat VERSION`
	ARCHIVE=selinux-$i-$VERS.tar.gz
	git tag selinux-$i-$VERS > /dev/null 2>&1
	git archive --format=tar --prefix=selinux-$i-$VERS/ selinux-$i-$VERS | gzip > ../$DEST/$ARCHIVE
	cd ..
done

cd $DEST

git add .

echo "Add the following to the $WIKIDIR/Releases.md wiki page:"

echo ""

echo "## Release $(date '+%Y-%m-%d')"

for i in *.tar.gz; do

	echo -n "[$i](https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/$(date '+%Y%m%d')/$i) "
	sha256sum $i | cut -d " " -f 1
	echo ""
done

echo "And then run:"
echo "  cd $WIKIDIR"
echo "  git commit  -m \"Release $(date '+%Y%m%d')\" -a -s"
echo "  git push"

echo ""
echo "Push the release and its tags to git via:"
echo "  git push"
echo "  git push --tags"