mirror of
https://github.com/FlipsideCrypto/fsc-utils.git
synced 2026-02-06 10:56:49 +00:00
add make tag directives
This commit is contained in:
parent
af0d6a95c8
commit
80485821ff
12
Makefile
Normal file
12
Makefile
Normal file
@ -0,0 +1,12 @@
|
||||
.PHONY: tag
|
||||
MAX_COUNT ?= 1
|
||||
|
||||
tag:
|
||||
@git add .
|
||||
@git commit -m "Bump version to $(version)"
|
||||
@git tag -a v$(version) -m "version $(version)"
|
||||
@git push origin v$(version)
|
||||
|
||||
get_latest_tags:
|
||||
@echo "Latest $(MAX_COUNT) tags:"
|
||||
@echo $$(tput setaf 2) `git describe --tags $(git rev-list --tags --max-count=$(MAX_COUNT))` $$(tput sgr0)
|
||||
37
README.md
37
README.md
@ -40,6 +40,43 @@ packages:
|
||||
revision: "v1.1.0"
|
||||
```
|
||||
|
||||
---
|
||||
**NOTE** Steps `2-5` above can also be automated using `make tag` directive:
|
||||
|
||||
### Tag Makefile Directives
|
||||
|
||||
#### `tag`
|
||||
|
||||
The `tag` directive is used to tag the current commit with a version number.
|
||||
|
||||
**Usage**:
|
||||
|
||||
```sh
|
||||
make tag version=<version_number>
|
||||
```
|
||||
Replace <version_number> with the version number you want to use.
|
||||
|
||||
What it does:
|
||||
|
||||
Adds all changes to the staging area with `git add .`
|
||||
Commits the changes with a commit message of `Bump version to <version_number>`.
|
||||
Creates a new `git tag` with the name `v<version_number>` and a message of `version <version_number>`.
|
||||
Pushes the new tag to the origin remote.
|
||||
|
||||
#### get_latest_tags
|
||||
The get_latest_tags directive is used to display the latest git tags. By default, it displays the latest tag. You can change the number of tags displayed by setting the MAX_COUNT variable.
|
||||
|
||||
Usage:
|
||||
|
||||
```sh
|
||||
make get_latest_tags MAX_COUNT=<count>
|
||||
```
|
||||
Replace <count> with the number of latest tags you want to display. If you don't specify a count, it defaults to `1`.
|
||||
|
||||
What it does:
|
||||
Displays the latest `<count> git tags` in green text.
|
||||
---
|
||||
|
||||
7. Run dbt deps in the other dbt project to pull the specific version of the package or follow the steps on `adding the dbt package` below.
|
||||
|
||||
Regarding Semantic Versioning;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user