-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Eric Wheeler
committed
Aug 14, 2024
1 parent
8c36042
commit 3e0ceaa
Showing
1 changed file
with
22 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,17 +27,33 @@ jobs: | |
sudo apt-get install -y build-essential autoconf automake libtool \ | ||
libgtk-3-dev libglib2.0-dev gettext desktop-file-utils devscripts fakeroot lintian autopoint dh-make | ||
- name: Determine version and dist | ||
id: version | ||
run: | | ||
# Get the most recent tag, and check if the latest commit is tagged | ||
LATEST_TAG=$(git describe --tags --abbrev=0) | ||
TAGGED_COMMIT=$(git describe --tags --exact-match 2>/dev/null || echo "notag") | ||
if [ "$TAGGED_COMMIT" = "notag" ]; then | ||
VERSION="${LATEST_TAG}+" | ||
DIST="-git" | ||
else | ||
VERSION=$LATEST_TAG | ||
DIST="" | ||
fi | ||
echo "VERSION=$VERSION" >> $GITHUB_ENV | ||
echo "DIST=$DIST" >> $GITHUB_ENV | ||
- name: Prepare Debian Packaging | ||
run: | | ||
# Initialize debian directory structure if it doesn't exist | ||
# Initialize debian directory structure with the correct version if it doesn't exist | ||
if [ ! -d "debian" ]; then | ||
dh_make --createorig -y --single --native --packagename xnec2c_1.0 | ||
dh_make --createorig -y --single --native --packagename xnec2c_$VERSION | ||
fi | ||
# Optionally modify the debian/changelog file if needed | ||
echo "xnec2c (1.0) unstable; urgency=low" > debian/changelog | ||
echo " * Initial release." >> debian/changelog | ||
echo " -- Your Name <[email protected]> $(date -R)" >> debian/changelog | ||
# Ensure the debian/rules file exists and is executable | ||
chmod +x debian/rules | ||
- name: Build the DEB package using debuild | ||
run: | | ||
|