-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a script to help with version bumping
- Loading branch information
1 parent
dbc25e5
commit 47596d5
Showing
2 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
# Get the current date in the format YYYY.MM.DD (stripping leading zeros) | ||
DATE=$(date +"%Y.%-m.%-d") | ||
|
||
# Get the current version from mix.exs | ||
VERSION=$(grep "version: " mix.exs | cut -d '"' -f2) | ||
|
||
echo "Bumping version from $VERSION to $DATE" | ||
# Replace the version in mix.exs with the new version | ||
sed -i "s/version: \"$VERSION\"/version: \"$DATE\"/g" mix.exs | ||
|
||
# Run checks to ensure it's a valid mix.exs file | ||
mix check |