Skip to content

Commit

Permalink
Refactor set-version.sh to dynamically determine version using git
Browse files Browse the repository at this point in the history
  • Loading branch information
maizied.majumder committed Oct 25, 2024
1 parent 2baa188 commit 1017027
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
Binary file removed linpad.deb
Binary file not shown.
Binary file added linpad_1.0.1-2baa188_amd64.snap
Binary file not shown.
3 changes: 3 additions & 0 deletions set-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
VERSION="1.0.1-$(git rev-parse --short HEAD)"
sed -i "s/^version: .*/version: \"$VERSION\"/" snapcraft.yaml
6 changes: 3 additions & 3 deletions snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: linpad
version: git # Use git to dynamically determine the version
version: "1.0.1-2baa188"
summary: "Linpad text editor for Ubuntu with enhanced features"
description: |
Linpad is a lightweight text editor designed for Ubuntu. It includes file handling, syntax highlighting, dark mode, zoom, word count, and replace functionality.
Expand All @@ -25,15 +25,15 @@ parts:
stage-packages:
- python3-tk # Required for Tkinter
- python3
- libsqlite3-dev # Additional dependency
- libssl-dev # Additional dependency
override-build: |
snapcraftctl build
mkdir -p $SNAPCRAFT_PART_INSTALL/usr/bin
cp linpad.py $SNAPCRAFT_PART_INSTALL/usr/bin/linpad
chmod +x $SNAPCRAFT_PART_INSTALL/usr/bin/linpad
prime: # Exclude unnecessary files
- "-usr/lib/libBLTlite.2.5.so.8.6" # Exclude unused library as per warning
version-script: |
echo "1.0.1-$(git rev-parse --short HEAD)"

apps:
linpad:
Expand Down

0 comments on commit 1017027

Please sign in to comment.