Skip to content

Commit 5193978

Browse files
authored
Add release script. (#5)
1 parent c13fd64 commit 5193978

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ build_pcap.stamp
99
# SonarQube scans
1010
.scannerwork/
1111
sonar-project.properties
12+
13+
release/

make-release

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
3+
VERSION=`cat pcap/VERSION`
4+
TAG=release-${VERSION}
5+
6+
echo "Preparing release with tag $TAG..."
7+
git tag $TAG
8+
if [ $? != 0 ]; then
9+
echo "This release already exists. You can not create another one. Aborting..."
10+
exit
11+
fi
12+
13+
echo "Clean files from previous release..."
14+
mkdir -p release
15+
rm -f release/*
16+
17+
echo "Download artifacts from github..."
18+
gh run download -n java-pcap -D release/
19+
20+
echo "Add jar files without the version in their names..."
21+
cp release/java-pcap-${VERSION}.jar release/java-pcap.jar
22+
23+
echo "Use gh to create a release."
24+
git push --tags upstream
25+
gh release create $TAG --generate-notes release/*

pcap/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.9.11
1+
1.9.12

0 commit comments

Comments
 (0)