Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
bdw429s committed Apr 29, 2022
2 parents 70d36e8 + 46f9deb commit 2c4ded6
Show file tree
Hide file tree
Showing 20 changed files with 1,229 additions and 830 deletions.
30 changes: 0 additions & 30 deletions .classpath

This file was deleted.

1 change: 1 addition & 0 deletions .github/FUNDING.YML
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
patreon: ortussolutions
62 changes: 62 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by separate terms of service, privacy policy, and support documentation.
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle

name: Runwar CI

# If your target is master or develop branch
on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]

# We get the required keys
workflow_call:
secrets:
AWS_ACCESS_KEY:
required: true
AWS_ACCESS_SECRET:
required: true

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'

# Do the build
- name: Build with Gradle
run: ./gradlew --refresh-dependencies

# Creating S3 destination folder name based on the version and copying just the jar into temp directory
- name: Change folder source
run: |
echo "folderName=`basename -s .jar dist/libs/runwar-*.jar | sed -e 's/runwar-//'`" >> $GITHUB_ENV
mkdir dist/libs/temp && cp dist/libs/runwar-*.jar dist/libs/temp
- name: Upload JAR to S3

# Run the upload on master branch
if: ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' }}

uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read
env:
AWS_S3_BUCKET: "downloads.ortussolutions.com"
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_SECRET }}
SOURCE_DIR: "dist/libs/temp/"
DEST_DIR: "cfmlprojects/runwar/${{env.folderName}}"
60 changes: 31 additions & 29 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,29 +1,31 @@
/bin
/dist
/lib
/build
/undertow
/testlibs
src/test/resources/war/simple.war/WEB-INF/urlrewrite.xml
src/test/resources/war/simple.war/WEB-INF/logs/
src/test/resources/work/
.gradle
gradle-app.setting
gradle/jvm
!gradle-wrapper.jar
.gradletasknamecache
.nb-gradle

#ignore the various too-lazy-to-fix-and-lame-anyway bash tests
gradle/*.sh
!gradle/jvm-setup.sh
testwars

#IDE files
*.project
.settings
.idea
*.iml
*.ipr
*.iws
/settings.xml
/bin
/dist
/lib
/libs
/build
/undertow
/testlibs
src/test/resources/war/simple.war/WEB-INF/urlrewrite.xml
src/test/resources/war/simple.war/WEB-INF/logs/
src/test/resources/work/
.gradle
gradle-app.setting
gradle/jvm
!gradle-wrapper.jar
.gradletasknamecache
.nb-gradle

#ignore the various too-lazy-to-fix-and-lame-anyway bash tests
gradle/*.sh
!gradle/jvm-setup.sh
testwars

#IDE files
*.project
.settings
.idea
*.iml
*.ipr
*.iws
/settings.xml
.classpath
84 changes: 10 additions & 74 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ plugins {
id 'com.github.johnrengelman.shadow' version '4.0.2'
id "com.diffplug.gradle.oomph.ide" version "3.17.1"
id "se.bjurr.gitchangelog.git-changelog-gradle-plugin" version "1.55"
// id "com.fizzed.rocker" version "0.24.0"
// id 'com.zyxist.chainsaw' version '0.3.1'
}

defaultTasks 'clean', 'shadow'
Expand All @@ -24,7 +22,6 @@ apply from: 'gradle/config.gradle'
sourceCompatibility = 1.8
targetCompatibility = 1.8
tasks.withType(JavaCompile) {
options.bootstrapClasspath = fileTree(include: ['**/jce.jar','**/rt.jar'], dir: "${System.properties['java.home']}/")
options.encoding = 'UTF-8'
options.compilerArgs += '-Xlint:unchecked'
options.compilerArgs += '-Xlint:deprecation'
Expand All @@ -45,7 +42,6 @@ wrapper{

javadoc {
options.addStringOption('Xdoclint:none', '-quiet')
// options.addBooleanOption('html5', true)
}

tasks.withType(Test) {
Expand All @@ -54,23 +50,9 @@ tasks.withType(Test) {
sourceSets {
main {
output.dir(generatedResources, builtBy: 'generateVersionFile')
// rocker {
// srcDir('src/main/rocker')
// }
}
}

/*
processResources {
filesMatching('properties/*.properties') {
filter ReplaceTokens, tokens: [
'build.version': project.property("version"),
'build.timestamp': project.buildTimestamp
]
}
}
*/

test {
// Enable JUnit 5 (Gradle 4.6+).
useJUnitPlatform { /*jvmArgs "-verbose:class"*/ }
Expand All @@ -85,21 +67,6 @@ test {
testLogging.showStandardStreams = true
}

/*rocker {
failOnError true
skipTouch true
// must not be empty when skipTouch is equal to false
touchFile ""
javaVersion '1.8'
extendsClass null
extendsModelClass null
optimize null
discardLogicWhitespace true
targetCharset null
suffixRegex null
postProcessing null
}*/

// create an OSGI manifest
apply plugin: 'com.diffplug.gradle.osgi.bndmanifest'
osgiBndManifest { copyTo 'META-INF/MANIFEST.MF' }
Expand Down Expand Up @@ -133,21 +100,14 @@ task sourceJar(type: Jar) {
from sourceSets.main.allSource
}

/*
tasks.withType(JavaCompile) {
options.compilerArgs.addAll([
"--add-exports",
"java.base/jdk.internal.misc=ALL-UNNAMED",
"--add-exports",
"java.base/jdk.internal.misc=runwar"
])
}
*/

shadowJar {
archiveClassifier = null
mergeServiceFiles()
exclude('**/*.java')
manifest {
attributes(
"Multi-Release": true )
}
}
apply from: 'gradle/proguard.gradle'
apply from: 'gradle/maven.gradle'
Expand All @@ -158,27 +118,11 @@ task copyToLib(type: Copy) {
from configurations.runtime
}

/*
task generateGitChangelogTemplateWithGitHubIssues(type: se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask) {
gitHubApi = "https://api.github.com/repos/Ortus-Solutions/runwar"
gitHubToken = System.properties['GITHUB_OAUTH2TOKEN']
gitHubIssuePattern = "#([0-9]*)"
file = new File("${buildDir}/CHANGELOG.md")
templateContent = file('gradle/changelog/changelog.mustache').getText('UTF-8')
}
*/

task gitChangelogTask() {
doLast {
GitChangelogApi builder;
builder = gitChangelogApiBuilder()
/*
println builder.withGitHubApi("https://api.github.com/repos/Ortus-Solutions/runwar")
.withGitHubToken(System.properties['GITHUB_OAUTH2TOKEN'])
.withGitHubIssuePattern("#([0-9]*)")
.withTemplatePath('gradle/changelog/changelog.mustache')
.render();
*/

println builder.withFromRef("master")
.withToRef("HEAD")
.withGitHubApi("https://api.github.com/repos/Ortus-Solutions/runwar")
Expand All @@ -187,7 +131,7 @@ task gitChangelogTask() {
.withNoIssueName("These commits have no issue in their commit comment")
.withTemplateContent("""
# Changelog
{{#tags}}
## {{name}}
{{^hasIssue}}
Expand All @@ -197,32 +141,24 @@ task gitChangelogTask() {
{{#hasLink}}
[{{issue}}]({{link}}) {{title}}
{{#commits}}
[{{hash}}] {{{messageTitle}}} (https://github.com/{{ownerName}}/{{repoName}}/commit/{{hash}})
[{{hash}}] {{{messageTitle}}} (https://github.com/{{ownerName}}/{{repoName}}/commit/{{hash}})
{{/commits}}
{{/hasLink}}
{{/issues}}
{{#issues}}
{{^hasLink}}
Commits:
{{#commits}}
[{{hash}}] {{{messageTitle}}} (https://github.com/{{ownerName}}/{{repoName}}/commit/{{hash}})
[{{hash}}] {{{messageTitle}}} (https://github.com/{{ownerName}}/{{repoName}}/commit/{{hash}})
{{/commits}}
{{/hasLink}}
{{/issues}}
{{/tags}}
""".stripIndent())
.render()

/*
println builder.withFromRef("refs/tags/3.7.0")
.withToRef("refs/tags/3.8.0")
.withTemplatePath('gradle/changelog/changelog.mustache')
.render()
*/
// file = new File("${buildDir}/CHANGELOG.md");
// templateContent = file('gradle/changelog/changelog.mustache').getText('UTF-8');
}
}

Expand Down
Loading

0 comments on commit 2c4ded6

Please sign in to comment.