Skip to content

Commit

Permalink
Update build.sh remote
Browse files Browse the repository at this point in the history
  • Loading branch information
zstg authored Sep 15, 2024
1 parent 5ea6901 commit 15f2d98
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ trap 'handle_error $LINENO' ERR

# Set up Arch Linux environment
setup_environment() {
export REPO="https://$(git config --get remote.origin.url | sed -E 's|.+[:/]([^:/]+)/([^/.]+)(\.git)?|\1|').github.io/repo/x86_64"
echo -e "\n[StratOS]\nSigLevel = Optional TrustAll\nServer = $URL" | sudo tee -a /etc/pacman.conf
export URL="https://$(git config --get remote.origin.url | sed -E 's|.+[:/]([^:/]+)/([^/.]+)(\.git)?|\1|').github.io/repo/x86_64"
echo -e "\n[StratOS-repo]\nSigLevel = Optional TrustAll\nServer = $URL" | sudo tee -a /etc/pacman.conf
sudo sed -i 's/purge debug/purge !debug/g' /etc/makepkg.conf
sudo sed -i 's/^#* *GPGKEY *=.*/GPGKEY="19A421C3D15C8B7C672F0FACC4B8A73AB86B9411"/' /etc/makepkg.conf # add zstg's public key
sed -i 's/^#*\(PACKAGER=\).*/\1"StratOS team <[email protected]>"/' /etc/makepkg.conf
Expand Down Expand Up @@ -138,15 +138,15 @@ build_and_package() {

# Initialize and push to GitHub
initialize_and_push() {
export REPO="$(git config --get remote.origin.url | sed -E 's|.+[:/]([^:/]+)/([^/.]+)(\.git)?|\1/\2|')"
export URL="$(git config --get remote.origin.url | sed -E 's|.+[:/]([^:/]+)/([^/.]+)(\.git)?|\1|')"
cd "$dir"
bash ./initialize.sh
sudo git config --global user.name 'github-actions[bot]'
sudo git config --global user.email 'github-actions[bot]@users.noreply.github.com'
sudo git add .
sudo git commit -am "Update packages"
sudo git pull
sudo git push "https://x-access-token:${GITHUB_TOKEN}@github.com/$REPO" --force
sudo git push "https://x-access-token:${GITHUB_TOKEN}@github.com/$URL/repo" --force
}

# Main function
Expand Down

0 comments on commit 15f2d98

Please sign in to comment.