This repository was archived by the owner on Jul 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpush.sh
More file actions
55 lines (44 loc) · 1.35 KB
/
push.sh
File metadata and controls
55 lines (44 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/env bash
# shellcheck disable=SC2035
# Script name: build-packages.sh
# Description: Script for automating 'makepkg' on the PKGBUILDS.
# Contributors: MikuX-Dev
# Set with the flags "-e", "-u", "-o pipefail" to make the script more robust
set -euo pipefail
# Define variables for paths
REPO_DIR="/home/builder/archfiery-repo"
X86_64_DIR="$REPO_DIR/x86_64"
OUTPUT_LARGE_DIR="/home/builder/output-large"
OUTPUT_SMALL_DIR="/home/builder/output-small"
# Move to the repository directory
cd "$REPO_DIR"
# Install Git LFS
git lfs install
# Move to the x86_64 directory and copy large packages
cd "$X86_64_DIR"
cp -r "$OUTPUT_LARGE_DIR"/* .
# Track large packages with Git LFS and echo each name
for package in *.pkg.tar.*; do
name=$(basename "$package")
echo "Tracking $name with Git LFS"
git lfs track "$name"
done
# Configure Git attributes
cat >>.gitattributes <<EOF
*.zst filter=lfs diff=lfs merge=lfs -text
*.zst !text !filter !merge !diff
EOF
mv .gitattributes "$REPO_DIR/"
# Copy small packages
cp -r "$OUTPUT_SMALL_DIR"/* .
# Make the update-db.sh script executable and run it
cd "$X86_64_DIR"
chmod +x ./update-db.sh
./update-db.sh
# Configure Git user information and commit changes
cd "$REPO_DIR/"
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"
git add .
git commit -m "Add built packages"
git push