diff --git a/.gitea/conventional_commits/generate-version.sh b/.gitea/conventional_commits/generate-version.sh index 7321f6b..60f8816 100755 --- a/.gitea/conventional_commits/generate-version.sh +++ b/.gitea/conventional_commits/generate-version.sh @@ -86,8 +86,8 @@ start() { echo "New version: $new_version" gitchangelog | grep -v "[rR]elease:" > HISTORY.md - echo $new_version > project_name/VERSION - git add project_name/VERSION HISTORY.md + echo $new_version > n8n_ollama/VERSION + git add n8n_ollama/VERSION HISTORY.md git commit -m "release: version $new_version 🚀" echo "creating git tag : $new_version" git tag $new_version diff --git a/.gitea/rename_project.sh b/.gitea/rename_project.sh deleted file mode 100755 index 52f1ee5..0000000 --- a/.gitea/rename_project.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash -while getopts a:n:u:d: flag -do - case "${flag}" in - a) author=${OPTARG};; - n) name=${OPTARG};; - u) urlname=${OPTARG};; - d) description=${OPTARG};; - esac -done - -echo "Author: $author"; -echo "Project Name: $name"; -echo "Project URL name: $urlname"; -echo "Description: $description"; - -echo "Renaming project..." - -original_author="author_name" -original_name="project_name" -original_urlname="project_urlname" -original_description="project_description" -# for filename in $(find . -name "*.*") -for filename in $(git ls-files) -do - sed -i "s/$original_author/$author/g" $filename - sed -i "s/$original_name/$name/g" $filename - sed -i "s/$original_urlname/$urlname/g" $filename - sed -i "s/$original_description/$description/g" $filename - echo "Renamed $filename" -done - -mv project_name $name - -# This command runs only once on GHA! -rm -rf .gitea/template.yml -rm -rf project_name -rm -rf project_name.Tests \ No newline at end of file diff --git a/.gitea/template.yml b/.gitea/template.yml deleted file mode 100644 index d1acf17..0000000 --- a/.gitea/template.yml +++ /dev/null @@ -1 +0,0 @@ -author: rochacbruno \ No newline at end of file diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 78eae2e..3cba2a4 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -41,7 +41,7 @@ jobs: - name: Check version match run: | REPOSITORY_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $2}' | tr '-' '_') - if [ "$(cat project_name/VERSION)" = "${GITHUB_REF_NAME}" ] ; then + if [ "$(cat n8n_ollama/VERSION)" = "${GITHUB_REF_NAME}" ] ; then echo "Version matches successfully!" else echo "Version must match!" @@ -57,5 +57,5 @@ jobs: run: | REPOSITORY_OWNER=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $1}' | tr '[:upper:]' '[:lower:]') REPOSITORY_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $2}' | tr '-' '_') - docker build -t "git.disi.dev/$REPOSITORY_OWNER/project_name:$(cat project_name/VERSION)" -f Containerfile ./ - docker push "git.disi.dev/$REPOSITORY_OWNER/project_name:$(cat project_name/VERSION)" \ No newline at end of file + docker build -t "git.disi.dev/$REPOSITORY_OWNER/n8n_ollama:$(cat n8n_ollama/VERSION)" -f Containerfile ./ + docker push "git.disi.dev/$REPOSITORY_OWNER/n8n_ollama:$(cat n8n_ollama/VERSION)" \ No newline at end of file diff --git a/.gitea/workflows/rename_project.yml b/.gitea/workflows/rename_project.yml deleted file mode 100644 index ca77350..0000000 --- a/.gitea/workflows/rename_project.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Rename the project from template - -on: [push] - -permissions: write-all - -jobs: - rename-project: - if: ${{ !endsWith (gitea.repository, 'Templates/Docker_Image') }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - # by default, it uses a depth of 1 - # this fetches all history so that we can read each commit - fetch-depth: 0 - ref: ${{ gitea.head_ref }} - - - run: echo "REPOSITORY_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $2}' | tr '-' '_')" >> $GITHUB_ENV - shell: bash - - - run: echo "REPOSITORY_URLNAME=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $2}')" >> $GITHUB_ENV - shell: bash - - - run: echo "REPOSITORY_OWNER=$(echo "$GITHUB_REPOSITORY" | awk -F '/' '{print $1}')" >> $GITHUB_ENV - shell: bash - - - name: Is this still a template - id: is_template - run: echo "::set-output name=is_template::$(ls .gitea/template.yml &> /dev/null && echo true || echo false)" - - - name: Rename the project - if: steps.is_template.outputs.is_template == 'true' - run: | - echo "Renaming the project with -a(author) ${{ env.REPOSITORY_OWNER }} -n(name) ${{ env.REPOSITORY_NAME }} -u(urlname) ${{ env.REPOSITORY_URLNAME }}" - .gitea/rename_project.sh -a ${{ env.REPOSITORY_OWNER }} -n ${{ env.REPOSITORY_NAME }} -u ${{ env.REPOSITORY_URLNAME }} -d "Awesome ${{ env.REPOSITORY_NAME }} created by ${{ env.REPOSITORY_OWNER }}" - - - name: Remove renaming workflow - if: steps.is_template.outputs.is_template == 'true' - run: | - rm .gitea/workflows/rename_project.yml - rm .gitea/rename_project.sh - - - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: "✅ Ready to clone and code." - # commit_options: '--amend --no-edit' - push_options: --force \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 32a72f1..1b072d1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,15 +1,15 @@ # How to develop on this project -project_name welcomes contributions from the community. +n8n_ollama welcomes contributions from the community. This instructions are for linux base systems. (Linux, MacOS, BSD, etc.) ## Setting up your own fork of this repo. - On gitea interface click on `Fork` button. -- Clone your fork of this repo. `git clone git@git.disi.dev:YOUR_GIT_USERNAME/project_urlname.git` -- Enter the directory `cd project_urlname` -- Add upstream repo `git remote add upstream https://git.disi.dev/author_name/project_urlname` +- Clone your fork of this repo. `git clone git@git.disi.dev:YOUR_GIT_USERNAME/n8n_ollama.git` +- Enter the directory `cd n8n_ollama` +- Add upstream repo `git remote add upstream https://git.disi.dev/Artifacts/n8n_ollama` - initialize repository for use `make setup` ## Install the project in develop mode diff --git a/Containerfile b/Containerfile index e996a1a..e5314fc 100644 --- a/Containerfile +++ b/Containerfile @@ -1,6 +1,6 @@ FROM alpine WORKDIR /app -COPY ./project_name/* /app +COPY ./n8n_ollama/* /app CMD ["sh", "/app/hello_world.sh"] \ No newline at end of file diff --git a/Makefile b/Makefile index 0587870..ccdfd60 100644 --- a/Makefile +++ b/Makefile @@ -19,24 +19,24 @@ help: ## Show the help. .PHONY: fmt fmt: issetup ## Format code using black & isort. - $(ENV_PREFIX)isort project_name/ - $(ENV_PREFIX)black -l 79 project_name/ + $(ENV_PREFIX)isort n8n_ollama/ + $(ENV_PREFIX)black -l 79 n8n_ollama/ $(ENV_PREFIX)black -l 79 tests/ .PHONY: lint lint: issetup ## Run pep8, black, mypy linters. - $(ENV_PREFIX)flake8 project_name/ - $(ENV_PREFIX)black -l 79 --check project_name/ + $(ENV_PREFIX)flake8 n8n_ollama/ + $(ENV_PREFIX)black -l 79 --check n8n_ollama/ $(ENV_PREFIX)black -l 79 --check tests/ - $(ENV_PREFIX)mypy --ignore-missing-imports project_name/ + $(ENV_PREFIX)mypy --ignore-missing-imports n8n_ollama/ .PHONY: release release: issetup ## Create a new tag for release. @echo "WARNING: This operation will create a version tag and push to gitea" @read -p "Version? (provide the next x.y.z semver) : " TAG - @echo "$${TAG}" > project_name/VERSION + @echo "$${TAG}" > n8n_ollama/VERSION @$(ENV_PREFIX)gitchangelog > HISTORY.md - @git add project_name/VERSION HISTORY.md + @git add n8n_ollama/VERSION HISTORY.md @git commit -m "release: version $${TAG} 🚀" @echo "creating git tag : $${TAG}" @git tag $${TAG} @@ -45,7 +45,7 @@ release: issetup ## Create a new tag for release. .PHONY: build build: issetup ## Create a new tag for release. - @docker build -t project_name:$(cat project_name/VERSION) -f Containerfile . + @docker build -t n8n_ollama:$(cat n8n_ollama/VERSION) -f Containerfile . # This project has been generated from rochacbruno/python-project-template # __author__ = 'rochacbruno' diff --git a/README.md b/README.md index a956634..85b568b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# project_name +# n8n_ollama -project_description +Awesome n8n_ollama created by Artifacts ## Usage diff --git a/project_name/hello_world.sh b/n8n_ollama/hello_world.sh similarity index 100% rename from project_name/hello_world.sh rename to n8n_ollama/hello_world.sh