Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
evanharmon1 committed Sep 18, 2024
1 parent c882113 commit 2911e76
Show file tree
Hide file tree
Showing 7 changed files with 135 additions and 24 deletions.
72 changes: 58 additions & 14 deletions copier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ git_provider:
- other
- none
default: github
when: false

git_init:
type: bool
Expand Down Expand Up @@ -165,83 +166,123 @@ devcontainer:
author_first_name:
type: str
default: Evan
when: false

author_last_name:
type: str
default: Harmon
when: false

_author_full_name:
author_full_name:
type: str
placeholder: "{{ author_first_name + ' ' + author_last_name }}"
default: "{{ author_first_name + ' ' + author_last_name }}"
when: false

author_email:
type: str
default: "[email protected]"
when: false

author_url:
type: str
default: "https://evanharmon.com"
when: false

author_git_provider_username:
type: str
default: evanharmon1
when: false

project_url:
type: str
default: "TODO: project_url"

_repo_url:
repo_url:
type: str
default: "https://{{ git_provider }}.com/{{ author_git_provider_username }}/{{ project_slug }}"
when: false

organization:
type: str
default: "Harmon Ops"
when: false

organization_url:
type: str
default: "https://harmonops.com"
when: false

organization_email:
type: str
default: "[email protected]"
when: false

docker_hub_username:
type: str
default: evanharmon1
when: false

_docker_image:
docker_image:
type: str
default: "TODO: docker_image"
when: false

# TODO: generate random color
_project_color: "TODO: random_color"
project_color:
type: str
default: "TODO: random_color"
when: false

# Paths
_projects_directory: ~/git
_projects_directory_full: "/Users/{{ author_first_name }}/git"
_bunches_directory: "/Users/evan/Library/Mobile Documents/com~apple~CloudDocs/Bunches"
_obsidian_directory: "/Users/evan/Local/Memex"
projects_directory:
type: str
default: ~/git
when: false

projects_directory_full:
type: str
default: "/Users/{{ author_first_name }}/git"
when: false

bunches_directory:
type: str
default: "/Users/evan/Library/Mobile Documents/com~apple~CloudDocs/Bunches"
when: false

obsidian_directory:
type: str
default: "/Users/evan/Local/Memex"
when: false

# Demographics
_country: United States
_state: Kansas
country:
type: str
default: United States
when: false

state:
type: str
default: Kansas
when: false

# Date & Time
_current_date:
current_date:
type: str
default: "{{ '%Y-%m-%d' | strftime }}"
when: false

_current_year:
current_year:
type: str
default: "{{ '%Y' | strftime }}"
when: false

_current_time:
current_time:
type: str
default: "{{ '%H:%M:%S' | strftime }}"
when: false

_ai_tool:
ai_tool:
type: str
choices:
- none
Expand All @@ -251,6 +292,7 @@ _ai_tool:
- gemini
- cursor
defult: none
when: false

# API Keys
# _ai_tool_key:
Expand Down Expand Up @@ -287,6 +329,8 @@ _tasks:
- command: echo "*******************************************************************"
- command: echo "******************** STARTING TASKS SECTION ***********************"
- command: echo "*******************************************************************"
- command: "echo '_bunches_directory is set to: {{ _bunches_directory }}'"
- command: "echo '_obsidian_directory is set to: {{ _obsidian_directory }}'"
- command: git init
when: "{{ git_init }}"
- command: gh repo create
Expand Down
4 changes: 2 additions & 2 deletions template/LICENSE.jinja
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{%- if license == "mit" -%}
MIT License

Copyright (c) 2024 {{ _author_full_name }}
Copyright (c) 2024 {{ author_full_name }}

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -57,7 +57,7 @@ TO THE EXTENT PERMITTED BY APPLICABLE LAW, LICENSOR SHALL NOT BE LIABLE FOR ANY

7. Governing Law

This License shall be governed by and construed in accordance with the laws of {{ _country }}. Any legal action or proceeding arising under this License shall be brought exclusively in the courts located in {{ _country }}.
This License shall be governed by and construed in accordance with the laws of {{ country }}. Any legal action or proceeding arising under this License shall be brought exclusively in the courts located in {{ country }}.

8. Entire Agreement

Expand Down
4 changes: 2 additions & 2 deletions template/README.md.jinja
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# README - {{ project_name }}
{{ project_description }}
{{ project_url }}
Author: {{ _author_full_name }}
Created: {{ _current_date }} {{ _current_time }}
Author: {{ author_full_name }}
Created: {{ current_date }} {{ current_time }}

## Setup & Installation

Expand Down
69 changes: 64 additions & 5 deletions template/Taskfile.yml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,71 @@ tasks:
silent: false
bunchAdd:
cmds:
- mv '.meta/Code Project - {{ project_name }}.bunch' '{{ _bunches_directory }}/'
- ln -s '{{ _bunches_directory }}/Code Project - {{ project_name }}.bunch' .meta
- mv '.meta/Code Project - {{ project_name }}.bunch' '{{ bunches_directory }}/'
- ln -s '{{ bunches_directory }}/Code Project - {{ project_name }}.bunch' .meta
silent: false
obsidianAdd:
cmds:
- mv '.meta/{{ project_name }}.md' '{{ _obsidian_directory }}/Professional/'
- ln -s '{{ _obsidian_directory }}/Professional/{{ project_name }}.md' .meta
- mv '.meta/{{ project_name }}.md' '{{ obsidian_directory }}/Professional/'
- ln -s '{{ obsidian_directory }}/Professional/{{ project_name }}.md' .meta
silent: false

{% raw %}vBumpPatch:
desc: Bump to the next patch version
vars:
LATEST_TAG:
sh: git tag --sort=-version:refname | head -n1
VERSION:
sh: echo "{{.LATEST_TAG}}" | sed 's/^v//'
MAJOR:
sh: echo "{{.VERSION}}" | cut -d. -f1
MINOR:
sh: echo "{{.VERSION}}" | cut -d. -f2
PATCH:
sh: echo "{{.VERSION}}" | cut -d. -f3
NEW_PATCH:
sh: expr {{.PATCH}} + 1
NEW_VERSION: v{{.MAJOR}}.{{.MINOR}}.{{.NEW_PATCH}}
cmds:
- echo "Latest tag is {{.LATEST_TAG}}"
- echo "Current version is {{.VERSION}}"
- echo "Bumping patch version to {{.NEW_VERSION}}"
- git tag {{.NEW_VERSION}}
- git push origin {{.NEW_VERSION}}
vBumpMinor:
desc: Bump to the next minor version
vars:
LATEST_TAG:
sh: git tag --sort=-version:refname | head -n1
VERSION:
sh: echo "{{.LATEST_TAG}}" | sed 's/^v//'
MAJOR:
sh: echo "{{.VERSION}}" | cut -d. -f1
MINOR:
sh: echo "{{.VERSION}}" | cut -d. -f2
NEW_MINOR:
sh: expr {{.MINOR}} + 1
NEW_VERSION: v{{.MAJOR}}.{{.NEW_MINOR}}.0
cmds:
- echo "Latest tag is {{.LATEST_TAG}}"
- echo "Current version is {{.VERSION}}"
- echo "Bumping minor version to {{.NEW_VERSION}}"
- git tag {{.NEW_VERSION}}
- git push origin {{.NEW_VERSION}}
vBumpMajor:
desc: Bump to the next major version
vars:
LATEST_TAG:
sh: git tag --sort=-version:refname | head -n1
VERSION:
sh: echo "{{.LATEST_TAG}}" | sed 's/^v//'
MAJOR:
sh: echo "{{.VERSION}}" | cut -d. -f1
NEW_MAJOR:
sh: expr {{.MAJOR}} + 1
NEW_VERSION: v{{.NEW_MAJOR}}.0.0
cmds:
- echo "Latest tag is {{.LATEST_TAG}}"
- echo "Current version is {{.VERSION}}"
- echo "Bumping major version to {{.NEW_VERSION}}"
- git tag {{.NEW_VERSION}}
- git push origin {{.NEW_VERSION}}{% endraw %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#==============================================================================
# .env.local
#==============================================================================
isProd=False
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#==============================================================================
# .env.prod
#==============================================================================
isProd=True
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Code Project - {{ project_name }} 🪛
---
< snippet.code

$ open -a 'Visual Studio Code' {{ _projects_directory }}/{{ project_slug }}/{{ project_slug }}.code-workspace
$ open -a 'Visual Studio Code' {{ projects_directory }}/{{ project_slug }}/{{ project_slug }}.code-workspace
%Visual Studio Code^

< snippet.maximize

0 comments on commit 2911e76

Please sign in to comment.