Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
BaseMax committed Nov 29, 2024
2 parents 502170e + cf54c33 commit c415c07
Show file tree
Hide file tree
Showing 100 changed files with 22,117 additions and 4,201 deletions.
6 changes: 4 additions & 2 deletions .bashrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
alias salam="/mnt/c/Users/MAX/Salam/src/main"
export PATH="$PATH:/mnt/c/Users/MAX/Salam/src"
alias salam="/mnt/c/Users/MAX/Salam/salam"

export PATH="$PATH:/mnt/c/Users/MAX/Salam"

source ~/.bashrc
3 changes: 0 additions & 3 deletions .codespellrc

This file was deleted.

37 changes: 35 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,41 @@
# Editor and system files
.DS_Store
.idea
.vscode
.idea/
.vscode/
*.bak
*.iml
*.ipr
*.swp
*.tmp

# Compiled object files
src/*.o
src/*.wino

# Executables
salam
salam.exe

# WebAssembly output
salam-wa.wasm
salam-wa.js
salam-wa.html

# Test output directories
test/**/output/

# Generated output files
out/*

# Temporary files
src/update.tmp

# Git metadata
.git
.gitignore

# Docker-specific exclusions
docker-compose.override.yaml
docker-compose.override.yml

docker/
4 changes: 2 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# About this file, see:
# Website: https://editorconfig.org/
# For Emacs users: https://github.com/editorconfig/editorconfig-emacs
# For Vim users: https://github.com/editorconfig/editorconfig-vim
# For Emacs users: https://github.com/editorgenerated-config/editorconfig-emacs
# For Vim users: https://github.com/editorgenerated-config/editorconfig-vim
# For VS Code users: https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig

root = true
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches:
- main

permissions:
contents: read

jobs:
build-linux:
runs-on: ubuntu-latest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
pull_request:
types: [opened]

permissions:
contents: read

jobs:
first-interaction:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Pull Request Labeler
on:
- pull_request_target

permissions:
contents: read

jobs:
labeler:
permissions:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/proselint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
branches:
- main

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest
Expand Down
64 changes: 64 additions & 0 deletions .github/workflows/run-sync-script.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Run Sync Script

on:
push:
branches:
- main

permissions:
contents: write

jobs:
run-sync-script:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install Python dependencies
run: |
cd config
if [ -f requirements.txt ]; then
cat requirements.txt
pip install -r requirements.txt
fi
- name: Run sync.py script
run: |
cd config
python3 sync.py
- name: Check for changes
id: check_changes
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "Changes detected"
echo "changes=true" >> $GITHUB_ENV
else
echo "No changes detected"
echo "changes=false" >> $GITHUB_ENV
fi
shell: bash

- name: Commit and push changes
if: env.changes == 'true'
run: |
FIRST_NAME="Max"
DOMAIN="gmail.com"
EMAIL="${FIRST_NAME}BaseCode@${DOMAIN}"
git config --global user.name "Max Base (GitHub Actions)"
git config --global user.email "$EMAIL"
git add -A
git commit -m "Auto-sync: Update after running sync.py script"
git push https://x-access-token:${{ secrets.USER_TOKEN }}@github.com/${{ github.repository }}.git
10 changes: 8 additions & 2 deletions .github/workflows/super-linter.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
name: Lint

on: [pull_request]
on:
push:
branches:
- main
pull_request:
branches:
- main

permissions: # added using https://github.com/step-security/secure-workflows
permissions:
contents: read

jobs:
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
name: Test

on: [pull_request]
on:
push:
branches:
- main
pull_request:
branches:
- main

permissions: # added using https://github.com/step-security/secure-workflows
permissions:
contents: read

jobs:
Expand Down
22 changes: 12 additions & 10 deletions .github/workflows/web-assembly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches:
- main

permissions:
contents: read

jobs:
build-deploy:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -62,7 +65,7 @@ jobs:
DOMAIN="gmail.com"
EMAIL="${FIRST_NAME}BaseCode@${DOMAIN}"
git clone https://github.com/SalamLang/Salam-Editor.git
# git clone https://github.com/SalamLang/Salam-Editor.git
git clone https://github.com/SalamLang/Salam-Auth.git
git config --global user.name "Max Base"
Expand Down Expand Up @@ -92,16 +95,15 @@ jobs:
- name: Commit and push changes if needed
if: ${{ env.JS_CHECKSUM != env.JS_CHECKSUM_EDITOR || env.WASM_CHECKSUM != env.WASM_CHECKSUM_EDITOR }}
run: |
cp ./salam-wa.js ./Salam-Editor/
cp ./salam-wa.wasm ./Salam-Editor/
cd Salam-Editor
sudo chown -R www-data:www-data *
git add salam-wa.js salam-wa.wasm
git commit -m "Release: Update WebAssembly files"
git push https://x-access-token:${{ secrets.USER_TOKEN }}@github.com/SalamLang/Salam-Editor.git
# cp ./salam-wa.js ./Salam-Editor/
# cp ./salam-wa.wasm ./Salam-Editor/
# cd Salam-Editor
# sudo chown -R www-data:www-data *
# git add salam-wa.js salam-wa.wasm
# git commit -m "Release: Update WebAssembly files"
# git push https://x-access-token:${{ secrets.USER_TOKEN }}@github.com/SalamLang/Salam-Editor.git
# cd ..
cd ..
cp ./salam-wa.js ./Salam-Auth/public/assets/salam/
cp ./salam-wa.wasm ./Salam-Auth/public/assets/salam/
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ test/**/output/
out/*

src/update.tmp

# src/generated-config/
# config/generated-json/
21 changes: 15 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ repos:
name: run prettier
description: format files with prettier
entry: prettier --write .
files: \.(css|html|md|ya?ml)$
files: \.(md|ya?ml)$
language: node
additional_dependencies: ['prettier@3.3.3']
- repo: https://github.com/jendrikseipp/vulture
rev: v2.13
hooks:
- id: vulture
name: run vulture
description: find dead Python code
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.10.0
hooks:
Expand All @@ -40,7 +41,8 @@ repos:
- id: bandit
name: run bandit
description: run bandit on all Python files
args: ['-c=pyproject.toml', '-r']
args: ['-c', 'pyproject.toml']
additional_dependencies: ['.[toml]']
- repo: https://github.com/gitleaks/gitleaks
rev: v8.21.2
hooks:
Expand All @@ -52,13 +54,14 @@ repos:
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-illegal-windows-names
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-toml
- id: check-vcs-permalinks
- id: check-yaml
exclude: ^config/layout/attribute/style/value\.yaml$
exclude: ^generated-config/layout/attribute/style/value\.yaml$
- id: destroyed-symlinks
- id: detect-aws-credentials
args: [--allow-missing-credentials]
Expand Down Expand Up @@ -93,7 +96,7 @@ repos:
hooks:
- id: markdownlint
name: run markdownlint
description: Check Markdown files with markdownlint
description: check Markdown files with markdownlint
args: [--config=.github/linters/.markdown-lint.yml]
types: [markdown]
files: \.md$
Expand All @@ -109,9 +112,9 @@ repos:
hooks:
- id: yamllint
name: run yamllint
description: Check YAML files with yamllint
description: check YAML files with yamllint
args: [--strict, -c=.github/linters/.yaml-lint.yml]
exclude: ^config/layout/attribute/style/value\.yaml$
exclude: ^generated-config/layout/attribute/style/value\.yaml$
types: [yaml]
files: \.ya?ml$
env:
Expand All @@ -129,3 +132,9 @@ repos:
hooks:
- id: isort
name: run isort (python)
description: a Python utility / library to sort imports
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.13.0'
hooks:
- id: mypy
args: ['--explicit-package-bases', '--ignore-missing-imports']
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Ignore artifacts:
build
config/layout/attribute/style/value.yaml
generated-config/layout/attribute/style/value.yaml
coverage
test
Loading

0 comments on commit c415c07

Please sign in to comment.