-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding support with versioning for non snapshot builds
Signed-off-by: Yariv Rachmani <[email protected]>
- Loading branch information
Showing
4 changed files
with
53 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash -xe | ||
# SPDX-License-Identifier: LGPL-2.1-or-later | ||
|
||
VERSION_SCRIPT=$(dirname "$(readlink -f "$0")")/version.sh | ||
|
||
VERSION="$(${VERSION_SCRIPT} short)" | ||
RELEASE="$(${VERSION_SCRIPT} release)" | ||
|
||
# Set version and release | ||
sed \ | ||
-e "s|@VERSION@|${VERSION}|g" \ | ||
-e "s|@RELEASE@|${RELEASE}|g" \ | ||
< initoverlayfs.spec.in \ | ||
> initoverlayfs.spec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash -e | ||
# SPDX-License-Identifier: LGPL-2.1-or-later | ||
|
||
# Current version of initoverlayfs | ||
VERSION=0.98 | ||
# Specify if build is a official release or a snapshot build | ||
IS_RELEASE=false | ||
# Used for official releases. Increment if necessary | ||
RELEASE="1" | ||
|
||
function short(){ | ||
echo ${VERSION} | ||
} | ||
|
||
function long(){ | ||
echo "$(short)-$(release)" | ||
} | ||
|
||
function release(){ | ||
# Package release | ||
|
||
if [ $IS_RELEASE = false ]; then | ||
# Used for nightly builds | ||
RELEASE="0.$(date +%04Y%02m%02d%02H%02M).git$(git rev-parse --short ${GITHUB_SHA:-HEAD})" | ||
fi | ||
echo $RELEASE | ||
} | ||
|
||
[ -z $1 ] && short || $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters