-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from ortus-boxlang/development
Version bump
- Loading branch information
Showing
7 changed files
with
107 additions
and
55 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# This workflow is used to build releases | ||
# It can also be called by other workflows to reuse the release flow. | ||
name: BoxLang PostgreSQL Release | ||
name: Release | ||
|
||
on: | ||
# If you push to main this will trigger a stable release | ||
|
@@ -18,12 +18,15 @@ on: | |
default: false | ||
type: boolean | ||
|
||
# Manual Trigger | ||
workflow_dispatch: | ||
|
||
env: | ||
MODULE_ID: bx-mssql | ||
SNAPSHOT: ${{ inputs.snapshot || false }} | ||
MODULE_ID: ${{ github.event.repository.name }} | ||
JDK: 21 | ||
GRADLE: 8.7 | ||
BUILD_ID: ${{ github.run_number }} | ||
SNAPSHOT: ${{ inputs.snapshot || false }} | ||
|
||
jobs: | ||
############################################# | ||
|
@@ -61,9 +64,16 @@ jobs: | |
id: current_version | ||
run: | | ||
# Read Version from gradle.properties | ||
echo "VERSION=`grep '^version=' gradle.properties | cut -d'=' -f2`" >> $GITHUB_ENV | ||
TMPVERSION=$(grep '^version=' gradle.properties | cut -d'=' -f2) | ||
# Replace existing prerelease identifier with -snapshot or append -snapshot if none exists | ||
# If we are on the development branch, we always append -snapshot | ||
if [[ "${{ github.ref }}" == "refs/heads/development" ]]; then | ||
TMPVERSION=$(echo $TMPVERSION | sed 's/-.*$//')-snapshot | ||
fi | ||
# Set the version in the environment | ||
echo "VERSION=$TMPVERSION" >> $GITHUB_ENV | ||
# Branche | ||
# Branch | ||
echo "Github Ref is $GITHUB_REF" | ||
echo "BRANCH=main" >> $GITHUB_ENV | ||
|
@@ -84,8 +94,8 @@ jobs: | |
run: | | ||
npm install -g markdownlint-cli | ||
markdownlint changelog.md --fix | ||
./gradlew downloadBoxLang | ||
./gradlew build -x test --stacktrace --console=plain | ||
gradle downloadBoxLang | ||
gradle build -x test --stacktrace --console=plain | ||
- name: Commit Changelog [unreleased] with latest version | ||
uses: EndBug/[email protected] | ||
|
@@ -110,7 +120,6 @@ jobs: | |
with: | ||
name: boxlang-build | ||
path: | | ||
build/reports/tests/** | ||
changelog.md | ||
|
@@ -125,21 +134,22 @@ jobs: | |
SOURCE_DIR: "build/distributions" | ||
DEST_DIR: "ortussolutions/boxlang-modules/${{ env.MODULE_ID }}/${{ env.VERSION }}" | ||
|
||
# - name: Upload API Docs to S3 | ||
# uses: jakejarvis/s3-sync-action@master | ||
# with: | ||
# args: --acl public-read | ||
# env: | ||
# AWS_S3_BUCKET: "apidocs.ortussolutions.com" | ||
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }} | ||
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_SECRET }} | ||
# SOURCE_DIR: "build-coldbox/apidocs" | ||
# DEST_DIR: "" | ||
- name: Upload API Docs to S3 | ||
uses: jakejarvis/s3-sync-action@master | ||
with: | ||
args: --acl public-read | ||
env: | ||
AWS_S3_BUCKET: "apidocs.ortussolutions.com" | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_SECRET }} | ||
SOURCE_DIR: "build/docs/javadoc" | ||
DEST_DIR: "boxlang-modules/${{ env.MODULE_ID }}/${{ env.VERSION }}" | ||
|
||
- name: Publish to ForgeBox | ||
run: | | ||
cd build/module | ||
box forgebox publish --force | ||
cd $GITHUB_WORKSPACE | ||
- name: Create Github Release | ||
uses: taiki-e/[email protected] | ||
|
@@ -180,14 +190,9 @@ jobs: | |
steps: | ||
- name: Checkout Development Repository | ||
uses: actions/checkout@v4 | ||
if: env.LTS == 'false' | ||
with: | ||
ref: development | ||
|
||
- name: Checkout LTS Repository | ||
uses: actions/checkout@v4 | ||
if: env.LTS == 'true' | ||
|
||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v3 | ||
with: | ||
|
@@ -205,12 +210,7 @@ jobs: | |
- name: Bump Version | ||
run: | | ||
if [ $LTS == 'true' ] | ||
then | ||
gradle bumpPatchVersion --stacktrace --console=plain | ||
else | ||
gradle bumpMinorVersion --stacktrace --console=plain | ||
fi | ||
gradle bumpMinorVersion --stacktrace --console=plain | ||
git pull | ||
- name: Commit Version Bump | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: BoxLang PostgreSQL Snapshots | ||
name: Snapshots | ||
|
||
on: | ||
push: | ||
|
@@ -10,6 +10,10 @@ concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
MODULE_ID: ${{ github.event.repository.name }} | ||
JDK_VERSION: 21 | ||
|
||
jobs: | ||
############################################# | ||
# Tests First baby! We fail, no build :( | ||
|
@@ -39,15 +43,11 @@ jobs: | |
uses: actions/setup-java@v4 | ||
with: | ||
distribution: "temurin" | ||
java-version: 21 | ||
java-version: ${{ env.JDK_VERSION }} | ||
|
||
- name: Format Java Source | ||
run: ./gradlew spotlessApply --stacktrace | ||
|
||
# - name: Format BoxLang Source | ||
# uses: Ortus-Solutions/[email protected] | ||
# with: | ||
# cmd: run-script format | ||
run: | | ||
./gradlew spotlessApply --stacktrace | ||
- name: Commit Format Changes | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
|
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 |
---|---|---|
|
@@ -8,7 +8,7 @@ plugins { | |
// For building shadow jars with jdk 17 ONLY | ||
//id 'com.github.johnrengelman.shadow' version '8.1.1' | ||
// For building shadow jars using JDK 21 +, they had to fork | ||
id "io.github.goooler.shadow" version "8.1.7" | ||
id "io.github.goooler.shadow" version "8.1.8" | ||
// Download task | ||
id "de.undercouch.download" version "5.6.0" | ||
} | ||
|
@@ -22,6 +22,12 @@ ext { | |
buildID = System.getenv( 'BUILD_ID' ) ?: '0' | ||
branch = System.getenv( 'BRANCH' ) ?: 'development' | ||
} | ||
if ( branch == 'development' ) { | ||
// If the branch is 'development', ensure the version ends with '-snapshot' | ||
// This replaces any existing prerelease identifier with '-snapshot' | ||
version = version.contains('-') ? version.replaceAll(/-.*/, '-snapshot') : "${version}-snapshot" | ||
boxlangVersion = boxlangVersion.contains('-') ? boxlangVersion.replaceAll(/-.*/, '-snapshot') : "${boxlangVersion}-snapshot" | ||
} | ||
|
||
repositories { | ||
mavenLocal() | ||
|
@@ -32,12 +38,13 @@ dependencies { | |
// Until BoxLang is published to Maven Central | ||
// Look for it in the local build directory | ||
// You must run `./gradle build -x test` in the BoxLang project | ||
compileOnly files( 'src/test/resources/libs/boxlang-1.0.0-all.jar' ) | ||
// https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc | ||
compileOnly files( '../../boxlang/build/distributions/boxlang-' + boxlangVersion + '-all.jar' ) | ||
compileOnly files( 'src/test/resources/libs/boxlang-' + boxlangVersion + '-all.jar' ) | ||
implementation 'com.microsoft.sqlserver:mssql-jdbc:12.6.1.jre11' | ||
|
||
// Testing Dependencies | ||
testImplementation files( 'src/test/resources/libs/boxlang-1.0.0-all.jar' ) | ||
testImplementation files( '../../boxlang/build/distributions/boxlang-' + boxlangVersion + '-all.jar' ) | ||
testImplementation files( 'src/test/resources/libs/boxlang-' + boxlangVersion + '-all.jar' ) | ||
testImplementation "org.junit.jupiter:junit-jupiter:5.+" | ||
testImplementation "org.mockito:mockito-core:5.+" | ||
testImplementation "com.google.truth:truth:1.+" | ||
|
@@ -59,6 +66,21 @@ compileTestJava{ | |
// Make sure the service loaders are created before testing | ||
dependsOn compileJava, serviceLoaderBuild | ||
} | ||
compileTestJava.finalizedBy( shadowJar ) | ||
|
||
/** | ||
* Clean up | ||
*/ | ||
clean { | ||
doLast{ | ||
var userDir = file( "${System.getProperty('user.home')}/.boxlang/classes" ) | ||
if ( userDir.exists() ) { | ||
userDir.deleteDir() | ||
println "+ Cleared user home classes " + userDir.toString() | ||
} | ||
println "+ Clean finalized!" | ||
} | ||
} | ||
|
||
javadoc { | ||
// To avoid our own doclet issues | ||
|
@@ -85,12 +107,12 @@ javadoc.finalizedBy( zipJavadocs ) | |
* This generates the META-INF/services files for the ServiceLoader as part of the `build` task | ||
*/ | ||
serviceLoader { | ||
serviceInterface 'ortus.boxlang.runtime.jdbc.drivers.IJDBCDriver' | ||
// serviceInterface 'ortus.boxlang.runtime.bifs.BIF' | ||
// serviceInterface 'ortus.boxlang.runtime.components.Component' | ||
// serviceInterface 'ortus.boxlang.runtime.async.tasks.IScheduler' | ||
// serviceInterface 'ortus.boxlang.runtime.cache.providers.ICacheProvider' | ||
// serviceInterface 'ortus.boxlang.runtime.events.IInterceptor' | ||
serviceInterface 'ortus.boxlang.runtime.jdbc.drivers.IJDBCDriver' | ||
serviceInterface 'ortus.boxlang.runtime.bifs.BIF' | ||
serviceInterface 'ortus.boxlang.runtime.components.Component' | ||
serviceInterface 'ortus.boxlang.runtime.async.tasks.IScheduler' | ||
serviceInterface 'ortus.boxlang.runtime.cache.providers.ICacheProvider' | ||
serviceInterface 'ortus.boxlang.runtime.events.IInterceptor' | ||
} | ||
|
||
jar { | ||
|
@@ -134,7 +156,8 @@ task createModuleStructure(type: Copy) { | |
// Token Replacements Go Here | ||
filter{ line -> line.replaceAll( '@build.version@', project.version ) } | ||
if( project.branch == "development" ){ | ||
filter{ line -> line.replaceAll( '\\[email protected]@', '-SNAPSHOT' ) } | ||
// We already add -snapshot to the project.version variable. | ||
filter{ line -> line.replaceAll( '\\[email protected]@', '' ) } | ||
} else { | ||
filter{ line -> line.replaceAll( '@build.number@', project.buildID ) } | ||
} | ||
|
@@ -146,7 +169,8 @@ task createModuleStructure(type: Copy) { | |
// Token Replacements Go Here | ||
filter{ line -> line.replaceAll( '@build.version@', project.version ) } | ||
if( project.branch == "development" ){ | ||
filter{ line -> line.replaceAll( '\\[email protected]@', '-SNAPSHOT' ) } | ||
// We already add -snapshot to the project.version variable. | ||
filter{ line -> line.replaceAll( '\\[email protected]@', '' ) } | ||
} else { | ||
filter{ line -> line.replaceAll( '@build.number@', project.buildID ) } | ||
} | ||
|
@@ -173,6 +197,7 @@ test { | |
showStandardStreams = true | ||
} | ||
} | ||
|
||
/** | ||
* TEMPORARY until we publish to maven | ||
* Task to download the latest jar from https://ortus-temp.s3.amazonaws.com/jericho/libs/boxlang-1.0.0-all.jar | ||
|
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Gradle Properties | ||
version=1.0.0 | ||
version=1.1.0 | ||
group=com.ortussolutions | ||
boxlangVersion=1.0.0 | ||
jdkVersion=21 |
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