Skip to content

Commit

Permalink
ci: pacman permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
duzda committed Nov 17, 2024
1 parent a3a4ff5 commit b50c6d4
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Repack pacman
run: bash pacman-repack.sh ${{ steps.package-version.outputs.current-version }}

- name: Create draft release
id: create_release
uses: softprops/action-gh-release@v1
Expand Down
31 changes: 31 additions & 0 deletions pacman-repack.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/bash

# This script fixes permissions for .pacman, this should be
# done elsewhere, either in electron builder or forge maker,
# although this script is ugly, it's a fast fix.

if [ $# -ne 1 ];
then echo "Please supply Deezer version"
fi

VERSION=$1

cd "./out/make"

mkdir "deezer-enhanced-${VERSION}"

# Unpack tar.xf to folder
tar -xf "deezer-enhanced-${VERSION}.pacman" --directory "deezer-enhanced-${VERSION}"

# Remove old package
rm "deezer-enhanced-${VERSION}.pacman"

# Apply fix
chmod 755 "deezer-enhanced-${VERSION}/opt/deezer-enhanced"

# Package as a new package
cd "deezer-enhanced-${VERSION}"
tar -Jcvf "../deezer-enhanced-${VERSION}.pacman" "usr" "opt" ".PKGINFO" ".MTREE" ".INSTALL"
cd ".."

cd "../.."

0 comments on commit b50c6d4

Please sign in to comment.