Skip to content

Commit

Permalink
Add just file
Browse files Browse the repository at this point in the history
  • Loading branch information
sschnabe committed Sep 17, 2024
1 parent 9e2dd68 commit 19084d5
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
48 changes: 48 additions & 0 deletions .justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# https://just.systems/man/en/

_default:
@just --list --unsorted

set fallback

MVN := "mvn --batch-mode --color=always --no-transfer-progress -Dmaven.plugin.validation=NONE"

# Lints java, yaml and markdown files
@lint:
{{MVN}} --quiet tidy:check impsort:check formatter:validate
docker run --rm --read-only --volume $(pwd):/tmp pipelinecomponents/yamllint --config-file /tmp/.yamllint --strict /tmp
docker run --rm --read-only --volume $(pwd):/tmp tmknom/markdownlint --config /tmp/.markdownlint.yaml /tmp

# Fix java and markdown files
@fix:
{{MVN}} tidy:pom impsort:sort formatter:format
docker run --rm --read-only --user $(id -u):$(id -g) --volume $(pwd):/tmp tmknom/markdownlint --config /tmp/.markdownlint.yaml --fix /tmp

# Update maven dependencies
@update:
{{MVN}} versions:update-properties

# Build project without surefire/invoker tests
@build:
{{MVN}} verify -Dmaven.test.skip.exec -Dinvoker.skip

# Build project
@verify:
{{MVN}} verify

# Deploy jar to sonatype snapshot repository
@deploy:
{{MVN}} deploy -Pdeploy

# Run release as dry-run without tests
@release-dryrun:
{{MVN}} release:clean
{{MVN}} release:prepare -DpushChanges=false -DpreparationGoals="clean verify -Dmaven.test.skip -Dinvoker.skip"
{{MVN}} release:perform -DlocalCheckout -Dgoals="clean deploy -Dmaven.test.skip -Dinvoker.skip -DskipNexusStagingDeployMojo"
git fetch --prune --prune-tags # remove local tag

# Run release and publish to maven central
@release-run:
{{MVN}} release:clean
{{MVN}} release:prepare
{{MVN}} release:perform
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@
<artifactId>maven-release-plugin</artifactId>
<version>${version.org.apache.maven.plugins.release}</version>
<configuration>
<arguments>--no-transfer-progress</arguments>
<arguments>--no-transfer-progress -Dmaven.plugin.validation=NONE --color=ALWAYS</arguments>
<scmReleaseCommitComment>@{prefix} prepare release @{releaseLabel} [no ci]</scmReleaseCommitComment>
<signTag>true</signTag>
<releaseProfiles>deploy,release</releaseProfiles>
Expand Down

0 comments on commit 19084d5

Please sign in to comment.