updated ruby install to system path
This commit is contained in:
@@ -139,36 +139,39 @@ jobs:
|
||||
|
||||
- name: Install fpm (system ruby) and package pacman
|
||||
run: |
|
||||
# Insert as the 'run:' body for the Arch job step that installs fpm and packages
|
||||
set -euo pipefail
|
||||
|
||||
# Update package DB and install ruby and build tools
|
||||
# Update and install ruby + build tools
|
||||
pacman -Syu --noconfirm
|
||||
pacman -S --noconfirm ruby base-devel
|
||||
|
||||
# Install fpm system-wide (Actions container runs as root)
|
||||
gem install --no-document fpm
|
||||
# Install fpm to /usr/local/bin so the executable is in a system path
|
||||
# Pin the version for reproducibility
|
||||
gem install --no-document -v '1.16.0' fpm -n /usr/local/bin
|
||||
|
||||
# Sanity checks
|
||||
echo "ruby version: $(ruby -v)"
|
||||
echo "gem env:"
|
||||
gem env
|
||||
|
||||
# Ensure system gem bin dir is on PATH for subsequent steps (usually /usr/local/bin)
|
||||
# Ensure /usr/local/bin is available to subsequent workflow steps
|
||||
echo "/usr/local/bin" >> $GITHUB_PATH
|
||||
|
||||
# Verify fpm is available
|
||||
# Immediate sanity checks
|
||||
echo "ruby: $(ruby -v)"
|
||||
echo "gem env:"
|
||||
gem env
|
||||
if ! command -v fpm >/dev/null 2>&1; then
|
||||
echo "fpm not found on PATH; gem installation may have gone to user dir. Diagnostics:"
|
||||
ruby -e "puts Gem.user_dir"
|
||||
ls -la "$(ruby -e 'print Gem.user_dir')/bin" || true
|
||||
exit 1
|
||||
echo "fpm still not found on PATH; diagnostics:"
|
||||
ruby -e "puts Gem.user_dir"
|
||||
ls -la "$(ruby -e 'print Gem.user_dir')/bin" || true
|
||||
exit 1
|
||||
fi
|
||||
fpm --version
|
||||
|
||||
# Package with fpm
|
||||
# Build package
|
||||
VERSION="$(poetry version -s)"
|
||||
mkdir -p dist
|
||||
chmod +x dist/android-file-handler
|
||||
fpm -s dir -t pacman -n android-file-handler -v "$VERSION" --architecture x86_64 --prefix /usr/local/bin -p "dist/android-file-handler-${VERSION}-1-x86_64.pkg.tar.zst" dist/android-file-handler
|
||||
fpm -s dir -t pacman -n android-file-handler -v "$VERSION" \
|
||||
--architecture x86_64 --prefix /usr/local/bin \
|
||||
-p "dist/android-file-handler-${VERSION}-1-x86_64.pkg.tar.zst" dist/android-file-handler
|
||||
|
||||
- name: Upload Arch package
|
||||
uses: actions/upload-artifact@v4
|
||||
|
||||
Reference in New Issue
Block a user