mirror of
https://github.com/Snigdha-OS/snigdhaos-backgrounds.git
synced 2025-09-05 12:56:37 +02:00
fix(bug): some minor improvements
This commit is contained in:
33
.github/workflows/commitizen.yml
vendored
Normal file
33
.github/workflows/commitizen.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
name: Commitizen Check on Push and Pull
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
commitizen_check:
|
||||
name: Check Commitizen Commit on Push
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '14'
|
||||
|
||||
- name: Install Commitizen
|
||||
run: npm install -g commitizen
|
||||
|
||||
- name: Verify Commitizen Commit
|
||||
run: |
|
||||
if git log --format='%s' ${{ github.event.before }}..${{ github.sha }} | grep -v '^(feat|fix|docs|style|refactor|perf|test|chore)(\(.+\))?: .+'; then
|
||||
echo "Invalid commit message found. Please use Commitizen convention."
|
||||
exit 1
|
||||
fi
|
48
push.sh
48
push.sh
@@ -1,27 +1,35 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Author : Eshan Roy <eshan@snigdhaos.org>
|
||||
# Author URI : https://eshanized.github.io/
|
||||
# Author : Eshanized <m.eshanized@gmail.com>
|
||||
# Author URI : https://tonmoyinfrastructure.github.io/eshanized/
|
||||
|
||||
# NOTE: REPO = Your Repository Name On the Host
|
||||
# NOTE: ORG = Your ORGANIZATION NAME or USERNAME
|
||||
# NOTE: HOST = GitHub, Gitlab, Bitbucket etc.
|
||||
################################ NOTE ################################
|
||||
#!!!!!!!!!!!!! Exexcute all the scripts at your own risk !!!!!!!!!!!!!
|
||||
# I have written the push script for Arch Linux and other Arch Based #
|
||||
# Linux Distribution. So this script will only work in ArchLinux and #
|
||||
# Arch based Linux Distribution. You may customize it according to #
|
||||
# your Distribution. #
|
||||
######################################################################
|
||||
|
||||
# Repo Config
|
||||
REPO=snigdhaos-backgrounds
|
||||
# Host Config
|
||||
HOST=https://github.com
|
||||
# Destination Config
|
||||
ORG=Snigdha-OS
|
||||
# ---> First We will check for commitizen is installed or not
|
||||
check_commitizen() {
|
||||
if ! pacman -Qq commitizen-go &> /dev/null; then
|
||||
echo "Commitizen is not installed. Please install it using 'yay -S commitizen-go'." >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Set the repository URL and branch
|
||||
REPO_URL="${HOST}/${ORG}/${REPO}.git"
|
||||
BRANCH="master" # or "main" depending on your repository's default branch
|
||||
# Function to stage, commit, and push changes
|
||||
push_to_github() {
|
||||
git add .
|
||||
git cz
|
||||
git push origin master
|
||||
}
|
||||
|
||||
# Commit message
|
||||
MESSAGE="@eshanized: push via script"
|
||||
# Main Function
|
||||
main() {
|
||||
check_commitizen
|
||||
push_to_github
|
||||
}
|
||||
|
||||
# Add all files, commit, and push changes
|
||||
git add .
|
||||
git commit -m "$MESSAGE"
|
||||
git push origin $BRANCH
|
||||
main
|
BIN
src/snigdhaos-backgrounds/snigdhaos-background-19.jpg
Normal file
BIN
src/snigdhaos-backgrounds/snigdhaos-background-19.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 758 KiB |
Reference in New Issue
Block a user