Skip to content

Commit

Permalink
Add DEV_NOTES.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hmiguim committed Apr 4, 2024
1 parent 7f289a2 commit 67d7025
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 0 deletions.
24 changes: 24 additions & 0 deletions DEV_NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# DEV Notes

## How to release a new version

Before create a new version please update the CHANGELOG.md.

```bash
bash dev/scripts/release.sh 1.0.0
```

This will trigger a CI/CD pipeline where it will:

* Build & Packaging the JDK library and CLI
* Build & deploy a docker image
* Create a draft GitHub release

After the pipeline ends please do the following step:

* Update the draft GitHub release
* Run the prepare next version script

```commandline
bash dev/scripts/prepare-next-release.sh 1.1.0
```
30 changes: 30 additions & 0 deletions dev/scripts/prepare-next-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env bash

# Version
NEXT_VERSION=$1

function syntax {
echo "Syntax: $1 NEXT_VERSION"
echo "Example: $1 2.3.0"
}

if [[ -z "$NEXT_VERSION" ]]; then
syntax "$0"
exit 1
fi

cat << EOF
################################
# Prepare for next version
################################
EOF

# Updating with next version SNAPSHOT
mvn versions:set versions:commit -DnewVersion="$NEXT_VERSION-SNAPSHOT"

# Commit Maven version update
git add -u
git commit -m "Setting version $NEXT_VERSION-SNAPSHOT"

# Push commits
git push
38 changes: 38 additions & 0 deletions dev/scripts/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/usr/bin/env bash

# Version
RELEASE_VERSION=$1

function syntax {
echo "Syntax: $1 RELEASE_VERSION"
echo "Example: $1 2.2.0"
}

if [[ -z "$RELEASE_VERSION" ]]; then
syntax "$0"
exit 1
fi

cat << EOF
################################
# Release version
################################
EOF

RELEASE_TAG="v$RELEASE_VERSION"

# Ensure all classes have license header
mvn license:format

# Updating RODA Maven modules
mvn versions:set versions:commit -DnewVersion="$RELEASE_VERSION"

# Commit Maven version update
git add -u
git commit -m "Setting version $RELEASE_VERSION"

# Create tag
git tag -a "$RELEASE_TAG" -m "Version $RELEASE_VERSION"

# Push tag
git push origin "$RELEASE_TAG"

0 comments on commit 67d7025

Please sign in to comment.