All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.21.3 2024-07-15
- Reformat help text in the style of cargo (#1223)
- Cancel in progres CI jobs when on the same run (#1227)
0.21.2 2024-07-10
- Bump git2 from 0.18.3 to 0.19.0 (#1212)
- Actually set
--depth 1
(#1211)
0.21.1 2024-06-21
- Add a date API that provides year, month and day access (#1201)
- Fix use of
bool
instead ofboolean
in the guide and add new types to error message (#1203)
- Update several dependencies (#1209)
0.21.0 2024-05-02
- Add the cargo-binstall installation method
- Don't rename snake_case to hyphens in project name (#1172)
- Small reformatting only
- Enable the sponsor button
- Update locked dependencies + bump rhai from 1.17.1 to 1.18.0 (#1182)
- Release plz can now force push
- Very minor markdown fix (#1166)
- Fix changelog creation config file, regarding the unreleased section
0.20.0 2024-03-26
- Bump home from 0.5.5 to 0.5.9 (#1085)
- Bump predicates from 3.0.4 to 3.1.0 (#1103)
- Bump assert_cmd from 2.0.12 to 2.0.13 (#1102)
- Bump bstr from 1.8.0 to 1.9.0 (#1094)
- Switch to sccache (#1126)
- Add Text and Editor type (#1113)
- Add --skip-submodules flag to optionalize cloning git submodules (#1112)
- Several versions (#1130)
- Ensure github-actions are updated by dependabot (#1134)
- Bump deps
- Ignore dependabot on examples folder (#1157)
- Bump heck to 0.5 and gix-config to 0.36 (#1160)
- Bump walkdir from 2.4.0 to 2.5.0 (#1151)
- Fix multiple
Unreleased
versions in CHANGELOG.md - Fix release pr should trigger builds
- Fix very strange old lint (#1125)
- Release-plz config file breaking changes (#1128)
- Default values are not ignored in silent mode (#1153)
0.19.0 2023-12-13
- Add support for generating from a specific git revision of a git template (#1070)
- Add release-plz pr (#1076)
- Add cliff.toml config file to release-plz config
- Bump fs-err from 2.9.0 to 2.11.0 (#1063)
- Update Arch Linux package URL in installation.md (#1064)
- Fine tune git-cliff config
- Fix git-cliff error on ci
- Use a new token for creating the release and coverage data (#1061)
- Convert destination to absolute path (#1072)
- Fix gh-pages deploy token issue
- Fix empty define values (#1078)
- Release-plz does not take the config file
- Hand release-plz config file over explicitly
- Extend the changelog config for git-cliff
- Reconfigure git-cliff a bit further
- Fix git-cliff changelog diff
0.18.5 2023-11-11
- chore(deps): bump some deps
- chore(deps): bump git2 from 0.17.2 to 0.18.0
- chore(deps): bump clap from 4.3.24 to 4.4.2
- feat: support abbreviation for sourcehut
- Use auth-git2 for git authentication
- feat(error): use
fs_err
instead ofstd::fs
to provide actionable error messages
0.18.4 2023-09-01
- refactor(tests): improve tests (fixes #107)
- fix: lints
- fix: lints
- fix: use tempdir prefix
- fix: update license field following SPDX 2.1 license expression standard
- fix: -Z option build failures
- fix: link to 'ignoring files'
- fix: prompt order (#885)
- chore(deps): bump gix-config from 0.27.0 to 0.28.0 #1019
- chore(deps): bump several versions #1017
- chore(deps): bump url from 2.3.1 to 2.4.1
- chore(deps): bump tempfile from 3.7.0 to 3.8.0
- chore(deps): bump tempfile from ~3.5 to ~3.7
- chore(deps): bump gix-config from 0.20.1 to 0.26.1
- chore(deps): bump clap from 4.2.7 to 4.3.19
- chore(deps): bump regex from 1.8.2 to 1.9.1
- chore(deps): bump bstr from 1.4.0 to 1.6.0
- chore(deps): bump rhai from 1.13.0 to 1.15.1
- chore(deps): bump path-absolutize from 3.0.14 to 3.1.0
0.18.3 2023-05-24
- Add type annotation to avoid ambiguity introduced in bstr 1.5.0 (#942)
- fix: Move to the smaller, cargo-team maintained
home
crate
- chore(deps): bump openssl from 0.10.50 to 0.10.52
- chore(deps): bump clap from 4.2.1 to 4.2.4
- chore(deps): bump regex from 1.7.3 to 1.8.1
- chore(deps): bump assert_cmd from 2.0.10 to 2.0.11
- chore(deps): bump predicates from 3.0.2 to 3.0.3
0.18.2 2023-04-11
- fix:
.liquid
suffixes not stripped when cloning git templates - Migrate from println! to log+env_logger
0.18.1 2023-02-25
0.18.0 2023-02-22
0.17.6 2023-01-19
- fix(ci): fix deb package on release (#852)
- release notes for 0.17.5 missed out on #844
0.17.5 2023-01-16
- build a debian package on release
- show a warning to the user if the template doesn't agree with the cli parameters
0.17.4 2022-12-14
- chore(deps): bump assert_cmd from 2.0.6 to 2.0.7
- chore(deps): bump predicates from 2.1.2 to 2.1.4
- chore(deps): bump clap from 4.0.22 to 4.0.29
- chore(deps): bump serde from 1.0.147 to 1.0.149
- chore(deps): bump git-config from 0.11.0 to 0.12.0
- chore(deps): bump openssl from 0.10.42 to 0.10.43
- chore(deps): bump git-config from 0.10.0 to 0.11.0
0.17.3 2022-11-11
0.17.2 2022-11-09
0.17.1 2022-11-07
0.17.0 2022-11-07
- Add
aarch64-apple-darwin
release package - Extend the GitHub CI build pipeline for spellchecks
- ci: close issues that are labeled as
waiting-for-user-input
and got no updates for 14days - feat: impl
Default
forGenerateArgs
andTemplatePath
- support providing
project-name
via hooks, env vars and template value file - Remove
Smoke Test
step - renaming files by using e.g.
{{project-name}}.yml
as filename doesn't remove the original file - Support
--test
for running tests on the expanded template
- Variables set in pre scripts don't carry over to the template
- Git default branch is not honored when using --path
- Deleting_a_non_existing_file_should_not_fail
- Fix typos
- Fix link to Github Action
- Fix tests (1.65.0 toolchain support + git 2.38.1 compatibility)
- When using --init, do not copy .git directories
- chore(deps): bump git-config from 0.5.0 to 0.10.0
- chore(deps): bump clap from 3.2.22 to 4.0
- Dependency_update
- chore(deps): bump semver from 1.0.12 to 1.0.13
- chore(deps): bump indoc from 1.0.6 to 1.0.7
- chore(deps): bump paste from 1.0.7 to 1.0.8
- chore(deps): bump thiserror from 1.0.31 to 1.0.32
- chore(deps): bump serde from 1.0.141 to 1.0.142
- chore(deps): bump serde from 1.0.140 to 1.0.141
- chore(deps): bump git2 from 0.14.4 to 0.15.0
- chore(deps): bump dialoguer from 0.10.1 to 0.10.2
- chore(deps): bump clap from 3.2.15 to 3.2.16
- chore(deps): bump anyhow from 1.0.58 to 1.0.59
- chore(deps): bump console from 0.15.0 to 0.15.1
- chore(deps): bump clap from 3.2.14 to 3.2.15
- chore(deps): bump clap from 3.2.8 to 3.2.12
- update dependencies
- Removed Serenity Template from Template List
- EstebanBorai
- MalloryA
- SergioGasquez
- chilipepperhott
- dependabot[bot]
- joshrotenberg
- kianmeng
- printfn
- sassman
- taurr
- turboMaCk
0.16.0 2022-07-25
-
Allow the template author to manually specify sub-temlates
Sub-templates may now be specified in the
cargo-generate.toml
file like this:[template] sub_templates = ["sub1", "sub2"]
Doing so also sets the order when
cargo-generate
asks what to expand, while the first option will be the default.If a selected template doesn't have a
cargo-generate.toml
file, but a parent one exists, any configured sub-templates will be ignored.Further implication is that sub-templates no longer needs to have a
cargo-generate.toml
file. -
Test for file existance from rhai scripts Adds the
file::exists(path: &str)
method for use from hook scripts. -
Conditionals and placeholders are now supported at multiple levels. If a template sets up more placeholders conditionally, those placeholders are now checked/asked for and respected for use in further expressions/conditionals.
-
Make it possible to convert to
snake_case
andkebab_case
fromRhai
-
Return the path of the generated project from the
generate
function
- fix(#514): boolean value being ignored
- fix lint error
- fix for cargo-generate changes the $CWD
- should fail if --define placeholder value doesn't match placeholder regex
- chore(deps): bump anyhow from 1.0.57 to 1.0.58
- chore(deps): bump clap from 3.2.5 to 3.2.6
- chore(deps): bump clap from 3.2.6 to 3.2.8
- chore(deps): bump clap from 3.2.8 to 3.2.12
- chore(deps): bump openssl-src from 111.20.0+1.1.1o to 111.22.0+1.1.1q
- chore(deps): bump rhai from 1.7.0 to 1.8.0
- chore(deps): bump serde from 1.0.137 to 1.0.138
- chore(deps): bump semver from 1.0.10 to 1.0.12
- chore(deps): bump serde from 1.0.138 to 1.0.139
- chore(deps): bump openssl from 0.10.40 to 0.10.41
- chore(deps): bump regex from 1.5.6 to 1.6.0
- refactor: use impl T to improve readability, and change path params to use Path
0.15.2 2022-06-16
0.15.1 2022-06-16
- Add
ssh-agent
support and fix windows git+ssh issues cargo-generate
without options panics and fix--help
0.15.0 2022-06-15
- Add placeholder
{{within_cargo_project}}
. Enables templates to adust if they are expanded inside acargo
project - output from a POST
rhai
script is seemingly output before expansion. - auto remove
.liquid
file extensions if present - Generate release packages for
aarch64-unknown-linux-gnu
- Enhance canonicalize_path and git errors
- chore(deps): upgrade to latest clap version + fix deprecations
- chore(deps): bump git-config from 0.4.0 to 0.5.0
- chore(deps): bump git-config from 0.2.0 to 0.4.0
- chore(deps): bump sanitize-filename from 0.3.0 to 0.4.0
- Override project_dir when using
generate()
- Replace
structopt
byclap
- fix(docs): related to
v0.14.0
some breaking required doc changes - Avoid panic caused by deleting git folders
0.14.0 2022-05-31
- Suppress misleading git initialization message
- Generate release packages for
x86_64-unknown-linux-gnu
- Allow system commands
- Less noise
- Enhance canonicalize_path and git errors
- Refactor of handling favorites, git and path
- chore(deps): bump sanitize-filename from 0.3.0 to 0.4.0
- chore(deps): bump anyhow from 1.0.56 to 1.0.57
- chore(deps): bump toml from 0.5.8 to 0.5.9
0.13.1 2022-04-11
- chore(deps): bump git-config from 0.1.11 to 0.2.1
- chore(deps): bump liquid* from 0.24 to 0.26
- chore(deps): bump rhai from 1.5.0 to 1.6.0
- chore(deps): bump versions
- chore(deps): bump path-absolutize from 3.0.11 to 3.0.12
- chore(deps): bump git2 version to 0.14
- chore(deps): bump regex from 1.5.4 to 1.5.5
- chore(deps): bump liquid-derive from 0.23.1 to 0.24.0
- chore(deps): bump anyhow from 1.0.53 to 1.0.56
- chore(deps): bump semver from 1.0.5 to 1.0.6
- chore(deps): bump rhai from 1.4.1 to 1.5.0
- chore(deps): bump dialoguer from 0.9.0 to 0.10.0
- chore(clippy): make clippy happy
- chore(docs): added git url to book.toml
0.13.0 2022-02-08
- feat(#299): cargo generate book
- feat(chat): add matrix chat and logo draft
- feat(#418) Make
--identity
configurable in cargo-generate.toml and verbose error message - feat(#520): Support Git's https to ssh rewriting configuration
- feat(#526): template sub directory error lacks context
- feat(#516): new
--force-git-init
flag
- fix(abbrev): fix index out of range for git abbrev
- fix(#79): improve the error message in case the repo or user does not exists
- fix(#510): Using
--path
bring the.git
folder from the source with it
- chore(book): minor fixes of broken links
- chore(deps): bump semver from 1.0.4 to 1.0.5
- chore(deps): bump tempfile from 3.2.0 to 3.3.0
- ci: remove reference to unused action
0.12.0 2022-02-04
0.11.1 2021-12-03
0.11.0 2021-11-07
- feature: add support for arrays in the variable::set Rhai script extension
- feature: add username placeholder
0.10.3 2021-10-11
0.10.2 2021-10-09
- fix(git+libgit2:versions): try to fix deps issue
- fix: Rhai variable extension not updating Liquid Object
- fix:
cargo-generate.toml
not picked up on interactive template selection
0.10.1 2021-09-23
- improve ergonomics when asking for project-name by @taurr
- revert_to_git2_0.13.21_to_avoid_issues by @taurr
0.10.0 2021-09-19
-
feat: prompt for subfolder upon multiple templates
by @taurr
-
feat: Pre/Post hooks, issue/18
Support for template hooks written in rhai.
Enables the template author to e.g. create/modify/prompt for template variables using complex logic, or to create/delete/rename files within the template.
by @taurr
- fix(docs): closes #447
- Save 33% in size on release binary, bump dependencies
- Remove cargo dependency
- chore(deps): bump thiserror from 1.0.26 to 1.0.28
- refactor: add more clippy warnings
- README: improve cargo_generate_version example
- README: specify minimum version for feature
- README: Added --path documentation
- README: add installation instructions for Arch Linux
- README: add a little starter guide for template ci testing
0.9.0 2021-08-24
-
enable paging for long choice lists
improving the handling of very long choice lists long see #400, by @taurr
-
template parsing: handle undefined variables gracefully
Undefined template variables do not cause any breaking of the template generation any longer. They will be kept as they are.
-
TEMPLATES.md: link to cargo-generate topic
Template repos should be tagged with the
cargo-generate
GitHub topic, read more..by @MarcoIeni, #407 by @sassman
-
a template can now be generated into the current dir, without a git init or anything, read more..
-
Allow version requirement in
cargo-generate.toml
a template can now define the compatible cargo generate version number requirement as a requirement, read more.. see #76, by @taurr
-
Allow cargo-generate.toml as alternative to cargo-generate., by @taurr
-
fix(tests:linux): use the current directory for canonicalize result, by @orhun
-
supporting now local folders (that are not under git) as templates via
--path <local-folder>
-
Allow specification of default template values
default values for template variables can now be defined on several levels, external file, in the favorites configuration and via environment variables, read more..
-
template variables in Directories, #396
supporting now template variables as directory names like
{{project_name}}/{{project_name}}.rs
by dave-tucker and #395 by @taurr
-
Allow
--define
to specify values #389command line argument
--define
to define template variablesby @taurr
- chore(deps): bump openssl from 0.10.35 to 0.10.36
- README: improve cargo_generate_version example
- ci: add documentation check
- fix additional clippy lints
- Fix typo in README.md
- Only use cross for linux prebuilt binaries
- chore(deps): bump anyhow from 1.0.42 to 1.0.43
- chore(deps): bump predicates from 2.0.1 to 2.0.2
- chore(deps): bump git2 from 0.13.20 to 0.13.21
- chore(deps): bump cargo from 0.54.0 to 0.55.0
- chore(deps): bump assert_cmd from 1.0.7 to 1.0.8
- chore(deps): bump assert_cmd from 1.0.8 to 2.0.0
0.8.0 2021-07-30
-
-
feat(template:filenames): template filenames now
solves #159
A template author can use those placeholders in file names. For example, a project named
awesome
, with a file name{{project_name}}.rs
will be transformed toawesome.rs
during generation. read more..by @sassman
-
feat(template:choices): better ux for template choice parameters
for templates that contains parameters with a list of options + default option, users can now choose items from the list via the arrow keys and don't need manual typing anymore
by @sassman
-
Feature: specify subdir in repo as template
solves / relates to #47 #78 #211 #291
In the following example we assume the subfolder
tests/integration/helpers
contain some template:cargo generate --git https://github.com/cargo-generate/cargo-generate tests/integration/helpers
The great thing is that library / tool authors are now enabled to ship their templates as part of e.g. the
examples/
folder directly from within their main repository.by @taurr
-
0.7.2 2021-07-22
-
- Prebuilt binaries workfow for common targets by @jashandeep-sohi Whenever a GitHub Release is published, cargo-generate binaries are build and attached to the release.
0.7.1 2021-07-18
0.7.0 2021-07-13
Finally, cargo-generate
supports git ssh remote
urls. Read more in the docs
The typically known environment variables HTTP_PROXY
and HTTPS_PROXY
are now supported by cargo-generate
.
Read more in the docs
- feat(progress-bar): more useful progress bar
- feat(crate-types): crate types --lib and --bin as in cargo init
Similar to cargo init --lib
, a crate-type
support is now there.
Read more in the docs
-
- chore(deps): bump anyhow from 1.0.41 to 1.0.42
- chore(deps): bump predicates from 1.0.8 to 2.0.0
- chore(deps): bump thiserror from 1.0.25 to 1.0.26
- chore(deps): bump structopt from 0.3.21 to 0.3.22
- chore(deps): bump assert_cmd from 1.0.5 to 1.0.7
- chore(clippy): make clippy happy
- chore(deps): bump openssl from 0.10.34 to 0.10.35
- chore(deps): bump cargo from 0.53.0 to 0.54.0
- chore(deps): bump anyhow from 1.0.40 to 1.0.41
- chore(deps): bump ignore from 0.4.17 to 0.4.18
- chore(deps): bump heck from 0.3.2 to 0.3.3
- chore(deps): bump assert_cmd from 1.0.4 to 1.0.5
- chore(deps): bump git2 from 0.13.19 to 0.13.20
- chore(deps): bump indicatif from 0.16.0 to 0.16.2
- chore(deps): bump thiserror from 1.0.24 to 1.0.25
- chore(docs): enhance vendored openssl installation
- chore(deps): bump assert_cmd from 1.0.3 to 1.0.4
- chore(deps): bump git2 from 0.13.18 to 0.13.19
- chore(deps): bump url from 2.2.1 to 2.2.2
- chore(deps): bump cargo from 0.52.0 to 0.53.0
- chore(deps): bump regex from 1.4.6 to 1.5.4
- chore(deps): bump openssl from 0.10.33 to 0.10.34
- chore(deps): bump predicates from 1.0.7 to 1.0.8
- chore(deps): bump regex from 1.4.5 to 1.4.6
- chore(deps): bump git2 from 0.13.17 to 0.13.18
0.6.1 2021-04-01
-
- chore(deps): bump cargo from 0.51.0 to 0.52.0
- chore(deps): bump serde from 1.0.124 to 1.0.125
- chore(deps): bump walkdir from 2.3.1 to 2.3.2
- chore(deps): bump anyhow from 1.0.39 to 1.0.40
- chore(deps): bump anyhow from 1.0.38 to 1.0.39
- chore(deps): bump dialoguer from 0.7.1 to 0.8.0
- chore(deps): bump openssl from 0.10.32 to 0.10.33
- chore(deps): bump console from 0.14.0 to 0.14.1
- chore(deps): bump regex from 1.4.3 to 1.4.5
- chore(deps): bump remove_dir_all from 0.6.1 to 0.7.0
- chore(deps): bump liquid from 0.21.5 to 0.22.0
0.6.0 2021-03-07
-
-
interactive variable leads to default, issue/17, by sassman
This allows for lazy typing when using custom variables in templates, so that a user does not need to type the default value, but rather can press in order to accept the default value that is presented.
-
Add
--vcs none
option to avoid initializing git repo, issue/244, by taurr -
Add favorites on cargo-generate.toml user config file, issue/210, by taurr
This allows you to specify one or more shortcuts / favourites in your personal cargo-generate config file under
$CARGO_HOME/cargo-generate
or$HOME/.cargo/cargo-generate
. You can read more about this feature hereUpdate: on backwards compatibility by sassman
-
Add user specific template variables, issue/17, by pedrohjordao
This allows a template author to define template specific variables. Those variables can be of type string and bool. Further more they can be a choice of a provided list. You can read more about this feature here in the docs.
A brief example:
[placeholders] my-placeholder = { type = "string", prompt = "Hello?", choices = ["hello", "world"], default = "hello", regex = "*" } use-serde = { type = "bool", prompt = "Add serde support?", default = false }
-
0.6.0-alpha.2 2021-02-18 [PRERELEASED]
-
-
interactive variable leads to default, issue/17, by sassman
This allows for lazy typing when using custom variables in templates, so that a user does not need to type the default value, but rather can press in order to accept the default value that is presented.
-
0.6.0-alpha.1 2021-02-15 [PRERELEASED]
-
-
Add
--vcs none
option to avoid initializing git repo, issue/244, by taurr -
Add favorites on cargo-generate.toml user config file, issue/210, by taurr
This allows you to specify one or more shortcuts / favourites in your personal cargo-generate config file under
$CARGO_HOME/cargo-generate
or$HOME/.cargo/cargo-generate
. You can read more about this feature here -
Add user specific template variables, issue/17, by pedrohjordao
This allows a template author to define template specific variables. Those variables can be of type string and bool. Further more they can be a choice of a provided list. You can read more about this feature here in the docs.
A brief example:
[placeholders] my-placeholder = { type = "string", prompt = "Hello?", choices = ["hello", "world"], default = "hello", regex = "*" } use-serde = { type = "bool", prompt = "Add serde support?", default = false }
-
0.5.3 2021-02-08
-
- Bump serde from 1.0.119 to 1.0.123 pull/287 by @dependabot-preview
- Bump liquid from 0.21.4 to 0.21.5 pull/286 by @dependabot-preview
- Bump assert_cmd from 1.0.2 to 1.0.3 pull/285 by @dependabot-preview
- Bump cargo from 0.50.0 to 0.50.1 pull/284 by @dependabot-preview
- Bump liquid-lib from 0.21.1 to 0.21.2 pull/283 by @dependabot-preview
- Bump liquid-derive from 0.21.0 to 0.21.1 pull/282 by @dependabot-preview
- Bump liquid-core from 0.21.2 to 0.21.3 pull/281 by @dependabot-preview
0.5.2 2021-01-25
-
-
make args fields public to provide a public API by @No9, pull/264
this allows the external usage of
cargo-generate
from any lib / binary see this example -
support operating system and architecture by @macalimlim, pull/252, issues/251
-
-
-
**fix creates an empty
.cargo-ok
, by @thomcc, pull/269, issues/259 -
apply rust best practices clippy + fmt + ci/cd pipeline by @sassman , pull/273 issue/270
Make clippy happy, and applies fmt for the whole code base Also, tests, linter (fmt+clippy) on mac, linux and windows are now executed on builds, means also for PRs Dismisses now travisCi and Appveyor
-
handle default branch properly by @cecton, pull/263, issues/258
Make sure that not
master
ormain
as branch name is used and expected, but rather use the git default branch.
-
-
- **
godot-rust-template
: Create games with Godot and Rust by @macalimlim, pull/248
- **
-
-
Ignore files in
.genignore
before walking/substitution - schell, pull/235 [issue/236]This fixes scenarios where liquid variables cause parsing errors in files that should be ignored.
-
Fix in CLI
help
option - SirWindfield, pull/234This fix the display of the
--branch
option in the help message, when executingcargo generate --help
.
-
-
-
generust
: a template that provides a Rust web server and WASM client with some interesting features - KyleU, pull/203 -
**
orbtk
: a template that lets you create user interfaces using OrbTk -
template-rust-backend-with-electron-frontend
: a template that lets you write a Rust native cdylib backend with Electron frontend - usagi, pull/218 -
swift-rust-xcode-template
: a template that lets you write an iOS app with Swift and Rust - simlay, pull/219 -
Win32
: a template that provides an interface to write low-level Win32 applications in Rust - ArmsOfSorrow , pull/220 -
**
QuickStart WebAssembly
: a template that lets you create a WebAssembly application with Rust -
rust-cli-template
: a template that lets you create easily a CLI with interesting features in it (color_eyre, tracing, in addition to benchmarking and testing boilerplate) - 9999years, pull/239 -
**
mongodb-service-template
: a template that lets you create a GraphQL service with MongoDB as backing storage
-
-
-
Support for
owner/repo
abbreviation for git URL format - 9999years, pull/242 -
Usage of default git branch instead of
master
- 9999years, pull/241 -
Updated
cargo-generate
to the latest and greatest in the Rust ecosystem - Veetaha, pull/237- Update all dependencies versions to latest ones
- Replace
rustfmt-preview
withrustfmt
- Replace
failure
withanyhow
- Remove
quicli
completely - Update cargo authors copied code to latest cargo master
- Fix clippy lints:
- Replace &PathBuf to &Path in code
- Remove bare
use crate_name
entires - Replace unexported
pub
withpub(crate)
- Apply some cosmetic impl refactorings
-
Code refactoring - SirWindfield, pull/233
-
Support all
liquid
filters - sassman, pull/225- Upgrade
liquid
to v0.20 - Enables all
liquid
default filters - Fix some findings of clippy
- Upgrade
-
Typo fixes in CONTRIBUTING.md - Darrenmeehan, pull/222
-
-
-
Add a verbose flag for printing excluded files - EverlastingBugstopper, pull/199
cargo-generate can now be run with a
--verbose
flag that will print the list of files/directories that it is ignoring. This means that by default the output for templates that exclude files will appear no differently from templates that do exclude files.
-
-
-
Update two failure scenarios to exit with code 1 - EverlastingBugstopper, pull/198
When cargo-generate fails due to an issue with git or if a target directory already exists, it will now fail with an exit code of 1.
-
Fix path display on Windows - tommyshem, issue/192 pull/195
Changes Windows file output from
"C:\\Users\\Me\\src\\example-com\\.genignore"
to"C:\Users\Me\src\example-com\.genignore"
-
Don't remove .github directory when only .git should be removed - softprops, issue/190 pull/191
When generating a new project, cargo-generate will remove the
.git
directory and initialize a new git tree. In doing so, it would remove any file or directory containing.git
, including.github
. This release fixes that bug!
-
-
-
Add config file for configuring include / exclude of files to template - xortive, pull/174
Adds support for the cargo-generate.toml file, which allows templates to configure which files should be processed, either using a whitelist method (
include
), or a blacklist method (exclude
). When bothinclude
andexclude
are present,include
will be preferred. This mirrors similarinclude
/exclude
behavior incargo
, and uses some of the same code.[template] include = ["Cargo.toml", "src/lib.rs"] # Only search for and replace template tags in Cargo.toml and src/lib.rs
[template] exclude = ["public/image.js"] # Don't look for template tags in public/image.js
[template] # This is an "invalid" configuration, so cargo-generate takes the "more specific" include option # and will only search for and replace template tags in Cargo.toml. include = ["Cargo.toml"] exclude = ["public/image.js"]
-
-
-
Respect default branch name of template - RotationMatrix, pull/166
The
--branch
flag will now work as intended and set the initial HEAD to the specified branch name. For example, runningcargo generate --git <gh pages template> --branch gh-pages
will set your generated project's default branch togh-pages
.
-
-
-
Cleanup of lingering clippy / rustfmt warnings - ashleygwilliams, pull/175
-
-
-
Fix messages related to rename behavior - xortive, pull/162
--force
would stopcargo-generate
renaming your project, but we would still message that the rename was happening. Not anymore! -
Use Vendored OpenSSL for macOS - xortive, pull/169
Our prebuilt binaries for macOS were using dynamically linked OpenSSL, and our CI was dynamically linking to a version of OpenSSL not installed by default on most macs. Now, the macOS release build of
cargo-generate
will work out of the box utilizing staticly linked, vendored OpenSSL.
-
-
-
Support case filters in templates - epage, issue/117 pull/140
Because we leverage
liquid
as a templating engine under the hood, we can add some specific filters to our substitutions to add a little more awesome. This feature adds 4 filters:capitalize
pascal_case
kebab_case
snake_case
Now we can tame any set of letters with any type of capitalization or dash! Give them a try and let us know what other types of features you'd like to see.
-
-
-
Windows releases on Appveyor - jaysonsantos, issue/145 pull/146
Thanks to a new tool,
wrangler
, that usescargo-generate
as a dependency, it was discovered that we were shipping broken Windows binaries. We've fixed that now!
-
-
-
fix relative paths to templates - DD5HT, issue/128 pull/129
When we previously merged the PR in 0.2.0 that leveraged
cargo
to clone the templates, enabling folks to work with private repositories- we introduced aGitConfig::new
function (replacing work done previously bylibgit2
). This function works great- but did not support relative paths. We didn't catch this because we weren't testing the relative paths usecase!With this PR, DD5HT has restored the relative path functionality- and added a test to prevent further regressions of this function!
-
-
- cargo update/cargo fmt - ashleygwilliams, pull/134 pull/133
-
-
don't error on missing
.genignore
file - DD5HT, issue/116 pull/120With 0.2.0 we introduced the idea of a
.genignore
file, however, we didn't account the situation where one would not be present. Thanks for filing an issue Diggsey and thanks for the quick fix DD5HT! -
enable use on private repositories- ChristopherMacGown, pull/119
This PR leveraged
cargo
to enable the ability to pull authenticated repos. As this project grows into something we'd like to integrate intocargo
, this gives us greater functionality and also moves us closer tocargo
's codebase. Yay! -
exclude submodules git metadata - ChristopherMacGown, pull/119
Two bugs, one PR! Adding a test found that git metadata wasn't being excluded from submodules- now it is! Thanks so much!
-
-
actix-tera
template - antweiss, pull/123samp rust sdk
template - Sreyas-Sreelal, pull/121
-
-
Support templates that use git submodules - k0pernicus, issue/83 pull/104
We now support templates that use git submodules! Yay!
-
Binary Releases for Linux, MacOS, and Windows - ashleygwilliams, issue/99 pull/111 pull/112
Motivated by a desire to more easily distributed the project - we now build binaries for our releases. No more waiting for compilation! You can just download and go!
-
Allow Liquid Templating
date
filter - ashleygwilliams, issue/70 pull/106By request, we've turned on the
date
filter for our templates. Now you can add nicely formatted dates to your projects! For more information, check out the Liquiddate
filter documentation. -
Add
.genignore
, ability to ignore files - DD5HT, issue/82 pull/96You can now add a
.genignore
file to your template. This file will specify the files to be "cleaned up" or " removed" from the template once it has been cloned to the user's local machine. -
Add
--branch
for specifying a branch - posborne, issue/71 pull/94We originally had no way to specify a git template on a per branch basis, opting to only support the primary branch. Now you can specify a branch:
cargo generate --git <gitURL> --branch <branchname>
-
Warn user if we change project name casing - k0pernicus, issue/65 pull/84
cargo-generate
will automagically "fix" the casing of your project name to match Cargo standards. If we end up changing the name you provide- we'll warn to let you know! -
Add
--force
flag to skip casing check on project name - toVersus, issue/66 pull/69cargo-generate
will automagically "fix" the casing of your project name to match Cargo standards. If you'd like to skip that, you can add--force
. -
List of available templates - ashleygwilliams, issue/74 issue/50 pull/75
We are now keeping a running list of templates that are available to use with
cargo-generate
. Please add more! -
Add short command
cargo gen
- DD5HT, issue/53 pull/72You can now use
cargo gen
as a short command forcargo generate
.
-
-
-
Fixed some clippy warnings - 4tm4j33tk4ur, pull/109
-
Test safety of
.genignore
- ashleygwilliams, issue/97 pull/98 -
cargo update
and updatecargo fmt
call - ashleygwilliams, issue/86 pull/88 -
Test project name casing - ashleygwilliams, issue/63 pull/64
-
-
-
Fix command to work properly as a cargo command - csmoe, issue/39 pull/44
Previous to this commit,
cargo-generate
was a CLI tool that was invoked by the commandcargo-generate
(note the dash). However, this tool intends to be a cargo subcommand! This commit changes how you invoke the tool- no more dash!cargo generate --git https://github.com/username/project --name look-ma-no-dash
-
Fix casing on
crate_name
substitution - ashleygwilliams, issue/41 pull/56crate_name
substitution is supposed to be a convenience, converting the given project's name to a name that you could use withextern crate
or in other in-code situations. Just one problem- before this commit, it didn't change the case! Now it will. Thanks so much to fitzgen for filing this issue (and a bunch of others)!
-
-
-
Document build and runtime dependencies - migerh, issue/42 pull/45
There are a few dependencies for the project that we hadn't documented. Many folks have these already installed, but some don't- so it's great that they are now well documented in the
README
. -
Update README and demo.gif to address The Dash - ashleygwilliams, pull/60
-
Typo Fix - rahulthakoor, pull/36
-
-
-
Test substitutions - ashleygwilliams, issue/34 pull/56
We had features we weren't testing. This PR now adds test coverage for:
- substitution of
crate_name
- correct casing change of
crate_name
- substitution in files beyond
Cargo.toml
We still don't have full coverage but at least it's improving!
- substitution of
-
Split test helpers into files - ashleygwilliams, issue/33 pull/35
"i like small files and i cannot lie"
-
- First release!