(patch) Scala Version, docs, builds
All checks were successful
/ Build and Test Library Snapshot (pull_request) Successful in 1m14s
All checks were successful
/ Build and Test Library Snapshot (pull_request) Successful in 1m14s
This commit is contained in:
parent
20fb91a62b
commit
77760809fc
5 changed files with 70 additions and 23 deletions
|
@ -26,7 +26,7 @@ jobs:
|
||||||
pre-commit run --all-files
|
pre-commit run --all-files
|
||||||
- name: 'Prepare Versioned Build'
|
- name: 'Prepare Versioned Build'
|
||||||
run: |
|
run: |
|
||||||
latest_git_tag="$(git describe --tags --abbrev=0)"
|
latest_git_tag="$(git describe --tags --abbrev=0 || echo 'No Tags')"
|
||||||
latest_commit_message="$(git show -s --format=%s HEAD)"
|
latest_commit_message="$(git show -s --format=%s HEAD)"
|
||||||
if [[ "$latest_commit_message" == *"(major)"* ]]; then
|
if [[ "$latest_commit_message" == *"(major)"* ]]; then
|
||||||
export GS_RELEASE_TYPE="major"
|
export GS_RELEASE_TYPE="major"
|
||||||
|
@ -34,12 +34,21 @@ jobs:
|
||||||
export GS_RELEASE_TYPE="minor"
|
export GS_RELEASE_TYPE="minor"
|
||||||
elif [[ "$latest_commit_message" == *"(patch)"* ]]; then
|
elif [[ "$latest_commit_message" == *"(patch)"* ]]; then
|
||||||
export GS_RELEASE_TYPE="patch"
|
export GS_RELEASE_TYPE="patch"
|
||||||
|
elif [[ "$latest_commit_message" == *"(docs)"* ]]; then
|
||||||
|
export GS_RELEASE_TYPE="norelease"
|
||||||
|
elif [[ "$latest_commit_message" == *"(norelease)"* ]]; then
|
||||||
|
export GS_RELEASE_TYPE="norelease"
|
||||||
else
|
else
|
||||||
export GS_RELEASE_TYPE="patch"
|
export GS_RELEASE_TYPE="norelease"
|
||||||
fi
|
fi
|
||||||
|
echo "GS_RELEASE_TYPE=$GS_RELEASE_TYPE" >> $GITHUB_ENV
|
||||||
echo "Previous Git Tag: $latest_git_tag"
|
echo "Previous Git Tag: $latest_git_tag"
|
||||||
echo "Latest Commit: $latest_commit_message ($GS_RELEASE_TYPE) (SNAPSHOT)"
|
echo "Latest Commit: $latest_commit_message ($GS_RELEASE_TYPE) (SNAPSHOT)"
|
||||||
sbtn -Dsnapshot=true -Drelease="$GS_RELEASE_TYPE" semVerInfo
|
if [ "$GS_RELEASE_TYPE" = "norelease" ]; then
|
||||||
|
sbtn -Dsnapshot=true -Drelease="patch" semVerInfo
|
||||||
|
else
|
||||||
|
sbtn -Dsnapshot=true -Drelease="$GS_RELEASE_TYPE" semVerInfo
|
||||||
|
fi
|
||||||
- name: 'Unit Tests and Code Coverage'
|
- name: 'Unit Tests and Code Coverage'
|
||||||
run: |
|
run: |
|
||||||
sbtn clean
|
sbtn clean
|
||||||
|
@ -48,5 +57,10 @@ jobs:
|
||||||
sbtn coverageReport
|
sbtn coverageReport
|
||||||
- name: 'Publish Snapshot'
|
- name: 'Publish Snapshot'
|
||||||
run: |
|
run: |
|
||||||
sbtn clean
|
echo "Testing env var propagation = ${{ env.GS_RELEASE_TYPE }}"
|
||||||
sbtn publish
|
if [ "${{ env.GS_RELEASE_TYPE }}" = "norelease" ]; then
|
||||||
|
echo "Skipping publish due to GS_RELEASE_TYPE=norelease"
|
||||||
|
else
|
||||||
|
sbtn clean
|
||||||
|
sbtn publish
|
||||||
|
fi
|
||||||
|
|
|
@ -27,7 +27,7 @@ jobs:
|
||||||
pre-commit run --all-files
|
pre-commit run --all-files
|
||||||
- name: 'Prepare Versioned Build'
|
- name: 'Prepare Versioned Build'
|
||||||
run: |
|
run: |
|
||||||
latest_git_tag="$(git describe --tags --abbrev=0)"
|
latest_git_tag="$(git describe --tags --abbrev=0 || echo 'No Tags')"
|
||||||
latest_commit_message="$(git show -s --format=%s HEAD)"
|
latest_commit_message="$(git show -s --format=%s HEAD)"
|
||||||
if [[ "$latest_commit_message" == *"(major)"* ]]; then
|
if [[ "$latest_commit_message" == *"(major)"* ]]; then
|
||||||
export GS_RELEASE_TYPE="major"
|
export GS_RELEASE_TYPE="major"
|
||||||
|
@ -35,26 +35,49 @@ jobs:
|
||||||
export GS_RELEASE_TYPE="minor"
|
export GS_RELEASE_TYPE="minor"
|
||||||
elif [[ "$latest_commit_message" == *"(patch)"* ]]; then
|
elif [[ "$latest_commit_message" == *"(patch)"* ]]; then
|
||||||
export GS_RELEASE_TYPE="patch"
|
export GS_RELEASE_TYPE="patch"
|
||||||
|
elif [[ "$latest_commit_message" == *"(docs)"* ]]; then
|
||||||
|
export GS_RELEASE_TYPE="norelease"
|
||||||
|
elif [[ "$latest_commit_message" == *"(norelease)"* ]]; then
|
||||||
|
export GS_RELEASE_TYPE="norelease"
|
||||||
else
|
else
|
||||||
export GS_RELEASE_TYPE="patch"
|
export GS_RELEASE_TYPE="norelease"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "GS_RELEASE_TYPE=$GS_RELEASE_TYPE" >> $GITHUB_ENV
|
||||||
echo "Previous Git Tag: $latest_git_tag"
|
echo "Previous Git Tag: $latest_git_tag"
|
||||||
echo "Latest Commit: $latest_commit_message"
|
echo "Latest Commit: $latest_commit_message"
|
||||||
echo "Selected Release Type: '$GS_RELEASE_TYPE'"
|
echo "Selected Release Type: '$GS_RELEASE_TYPE'"
|
||||||
sbtn -Drelease="$GS_RELEASE_TYPE" semVerInfo
|
|
||||||
|
if [ "$GS_RELEASE_TYPE" = "norelease" ]; then
|
||||||
|
echo "Skipping all versioning for 'norelease' commit."
|
||||||
|
else
|
||||||
|
sbtn -Drelease="$GS_RELEASE_TYPE" semVerInfo
|
||||||
|
fi
|
||||||
- name: 'Unit Tests and Code Coverage'
|
- name: 'Unit Tests and Code Coverage'
|
||||||
run: |
|
run: |
|
||||||
sbtn clean
|
if [ "${{ env.GS_RELEASE_TYPE }}" = "norelease" ]; then
|
||||||
sbtn coverage
|
echo "Skipping build/test for 'norelease' commit."
|
||||||
sbtn test
|
else
|
||||||
sbtn coverageReport
|
sbtn clean
|
||||||
|
sbtn coverage
|
||||||
|
sbtn test
|
||||||
|
sbtn coverageReport
|
||||||
|
fi
|
||||||
- name: 'Publish Release'
|
- name: 'Publish Release'
|
||||||
run: |
|
run: |
|
||||||
sbtn clean
|
if [ "${{ env.GS_RELEASE_TYPE }}" = "norelease" ]; then
|
||||||
sbtn semVerWriteVersionToFile
|
echo "Skipping publish for 'norelease' commit."
|
||||||
sbtn publish
|
else
|
||||||
|
sbtn clean
|
||||||
|
sbtn semVerWriteVersionToFile
|
||||||
|
sbtn publish
|
||||||
|
fi
|
||||||
- name: 'Create Git Tag'
|
- name: 'Create Git Tag'
|
||||||
run: |
|
run: |
|
||||||
selected_version="$(cat .version)"
|
if [ "${{ env.GS_RELEASE_TYPE }}" = "norelease" ]; then
|
||||||
git tag "$selected_version"
|
echo "Skipping Git tag for 'norelease' commit."
|
||||||
git push origin "$selected_version"
|
else
|
||||||
|
selected_version="$(cat .version)"
|
||||||
|
git tag "$selected_version"
|
||||||
|
git push origin "$selected_version"
|
||||||
|
fi
|
||||||
|
|
14
README.md
14
README.md
|
@ -1,15 +1,20 @@
|
||||||
# gs-uuid
|
# gs-uuid
|
||||||
|
|
||||||
[License (Apache 2.0)](./LICENSE)
|
[GS Open Source](https://garrity.co/oss.html) |
|
||||||
|
[License (MIT)](./LICENSE)
|
||||||
|
|
||||||
UUID's for Scala 3 with generation based on JUG, and serialization based on code
|
UUID's for Scala 3 with generation based on JUG, and serialization based on code
|
||||||
from Jackson Databind. The only dependency is JUG, whereas the relevant Jackson
|
from Jackson Databind. The only dependency is JUG, whereas the relevant Jackson
|
||||||
code is copied to this implementation (and slightly modified).
|
code is copied to this implementation (and slightly modified).
|
||||||
|
|
||||||
- [Usage](#usage)
|
- [Usage](#usage)
|
||||||
|
- [Dependency](#dependency)
|
||||||
|
- [Donate](#donate)
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
### Dependency
|
||||||
|
|
||||||
This artifact is available in the Garrity Software Maven repository.
|
This artifact is available in the Garrity Software Maven repository.
|
||||||
|
|
||||||
```scala
|
```scala
|
||||||
|
@ -17,5 +22,10 @@ externalResolvers +=
|
||||||
"Garrity Software Releases" at "https://maven.garrity.co/releases"
|
"Garrity Software Releases" at "https://maven.garrity.co/releases"
|
||||||
|
|
||||||
val GsUuid: ModuleID =
|
val GsUuid: ModuleID =
|
||||||
"gs" %% "gs-uuid-v0" % "0.1.0"
|
"gs" %% "gs-uuid-v0" % "$VERSION"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Donate
|
||||||
|
|
||||||
|
Enjoy this project or want to help me achieve my [goals](https://garrity.co)?
|
||||||
|
Consider [Donating to Pat on Ko-fi](https://ko-fi.com/gspfm).
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
val scala3: String = "3.4.0"
|
val scala3: String = "3.4.1"
|
||||||
|
|
||||||
ThisBuild / scalaVersion := scala3
|
ThisBuild / scalaVersion := scala3
|
||||||
ThisBuild / versionScheme := Some("semver-spec")
|
ThisBuild / versionScheme := Some("semver-spec")
|
||||||
|
|
|
@ -29,5 +29,5 @@ externalResolvers := Seq(
|
||||||
)
|
)
|
||||||
|
|
||||||
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.11")
|
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.11")
|
||||||
addSbtPlugin("gs" % "sbt-garrity-software" % "0.2.0")
|
addSbtPlugin("gs" % "sbt-garrity-software" % "0.3.0")
|
||||||
addSbtPlugin("gs" % "sbt-gs-semver" % "0.2.2")
|
addSbtPlugin("gs" % "sbt-gs-semver" % "0.3.0")
|
||||||
|
|
Loading…
Add table
Reference in a new issue