Skip to content

Commit

Permalink
feat: add project_version config option
Browse files Browse the repository at this point in the history
  • Loading branch information
pplmx committed Sep 16, 2024
1 parent 6af067d commit 20d5de3
Show file tree
Hide file tree
Showing 18 changed files with 18 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/configs/template_inputs_cuda_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ default_context:
project_slug: example-cuda-cmake
package_name: example_cuda_cmake
project_desc: A nice example project
project_version: 0.0.1

# C++
cxx_build_tool: cmake
1 change: 1 addition & 0 deletions .github/configs/template_inputs_cuda_xmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ default_context:
project_slug: example-cuda-xmake
package_name: example_cuda_xmake
project_desc: A nice example project
project_version: 0.0.1

# C++
cxx_build_tool: xmake
1 change: 1 addition & 0 deletions .github/configs/template_inputs_cxx_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ default_context:
project_slug: example-cxx-cmake
package_name: example_cxx_cmake
project_desc: A nice example project
project_version: 0.0.1

# C++
cxx_build_tool: cmake
1 change: 1 addition & 0 deletions .github/configs/template_inputs_cxx_xmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ default_context:
project_slug: example-cxx-xmake
package_name: example_cxx_xmake
project_desc: A nice example project
project_version: 0.0.1

# C++
cxx_build_tool: xmake
1 change: 1 addition & 0 deletions .github/configs/template_inputs_go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ default_context:
project_slug: example-go
package_name: example_go
project_desc: A nice example project
project_version: 0.0.1

# Go
go_version: 1.22
1 change: 1 addition & 0 deletions .github/configs/template_inputs_py.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ default_context:
project_slug: example-py
package_name: example_py
project_desc: A nice example project
project_version: 0.0.1

# Python
python_version: 3.11
1 change: 1 addition & 0 deletions .github/configs/template_inputs_ts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ default_context:
project_slug: example-ts
package_name: example_ts
project_desc: A nice example project
project_version: 0.0.1

# Node
node_version: 20
1 change: 1 addition & 0 deletions template/cuda/cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"project_slug": "{{ cookiecutter.project_name | slugify }}",
"package_name": "{{ cookiecutter.project_slug | replace('-', '_') }}",
"project_desc": "A nice cuda project",
"project_version": "0.0.1",
"email": "email@example.com",
"full_name": "Firstname Lastname",
"github_username": "your-org-or-username",
Expand Down
2 changes: 1 addition & 1 deletion template/cuda/{{cookiecutter.project_slug}}/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.25)

# Define the project
project({{cookiecutter.project_slug}}
VERSION 0.0.1
VERSION {{cookiecutter.project_version}}
DESCRIPTION "{{cookiecutter.project_desc}}"
HOMEPAGE_URL "https://github.com/{{cookiecutter.__gh_slug}}"
LANGUAGES CXX CUDA
Expand Down
2 changes: 1 addition & 1 deletion template/cuda/{{cookiecutter.project_slug}}/xmake.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-- Specify the project details
set_project("{{cookiecutter.project_slug}}")
set_version("0.0.1")
set_version("{{cookiecutter.project_version}}")

-- Specify languages
set_languages("cxx17")
Expand Down
1 change: 1 addition & 0 deletions template/cxx/cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"project_slug": "{{ cookiecutter.project_name | slugify }}",
"package_name": "{{ cookiecutter.project_slug | replace('-', '_') }}",
"project_desc": "A nice cxx project",
"project_version": "0.0.1",
"email": "email@example.com",
"full_name": "Firstname Lastname",
"github_username": "your-org-or-username",
Expand Down
2 changes: 1 addition & 1 deletion template/cxx/{{cookiecutter.project_slug}}/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.25)

# Define the project
project({{cookiecutter.project_slug}}
VERSION 0.0.1
VERSION {{cookiecutter.project_version}}
DESCRIPTION "{{cookiecutter.project_desc}}"
HOMEPAGE_URL "https://github.com/{{cookiecutter.__gh_slug}}"
LANGUAGES CXX
Expand Down
2 changes: 1 addition & 1 deletion template/cxx/{{cookiecutter.project_slug}}/xmake.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-- Set project name and language
set_project("{{cookiecutter.project_slug}}")
set_version("0.0.1")
set_version("{{cookiecutter.project_version}}")
set_languages("c++{{cookiecutter.cxx_standard_version}}")

-- Include directories
Expand Down
1 change: 1 addition & 0 deletions template/go/cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"project_slug": "{{ cookiecutter.project_name | slugify }}",
"package_name": "{{ cookiecutter.project_slug | replace('-', '_') }}",
"project_desc": "A nice go project",
"project_version": "0.0.1",
"email": "email@example.com",
"full_name": "Firstname Lastname",
"github_username": "your-org-or-username",
Expand Down
1 change: 1 addition & 0 deletions template/py/cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"project_slug": "{{ cookiecutter.project_name | slugify }}",
"package_name": "{{ cookiecutter.project_slug | replace('-', '_') }}",
"project_desc": "A nice python project",
"project_version": "0.0.1",
"email": "email@example.com",
"full_name": "Firstname Lastname",
"github_username": "your-org-or-username",
Expand Down
2 changes: 1 addition & 1 deletion template/py/{{cookiecutter.project_slug}}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "{{cookiecutter.project_slug}}"
version = "0.0.1"
version = "{{cookiecutter.project_version}}"
description = "{{cookiecutter.project_desc}}"
requires-python = ">={{cookiecutter.python_version}}"
license = "MIT"
Expand Down
1 change: 1 addition & 0 deletions template/ts/cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"project_slug": "{{ cookiecutter.project_name | slugify }}",
"package_name": "{{ cookiecutter.project_slug | replace('-', '_') }}",
"project_desc": "A nice typescript project",
"project_version": "0.0.1",
"email": "email@example.com",
"full_name": "Firstname Lastname",
"github_username": "your-org-or-username",
Expand Down
2 changes: 1 addition & 1 deletion template/ts/{{cookiecutter.project_slug}}/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "{{cookiecutter.project_slug}}",
"version": "0.1.0",
"version": "{{cookiecutter.project_version}}",
"description": "{{cookiecutter.project_desc}}",
"author": "{{cookiecutter.full_name}}",
"repository": {
Expand Down

0 comments on commit 20d5de3

Please sign in to comment.