Skip to content

Commit

Permalink
Merge pull request #513 from TheRealAgentK/master
Browse files Browse the repository at this point in the history
Fix changelog for 1.3.0 and transplanting #382 work into master
  • Loading branch information
TheRealAgentK authored Jan 1, 2018
2 parents 86d0717 + 297eac7 commit accbb03
Show file tree
Hide file tree
Showing 5 changed files with 135 additions and 42 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
/.gradle/
*.iml
.scannerwork
user.properties
53 changes: 49 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,54 @@

## [CFLint-1.3.0](https://github.com/cflint/CFLint/tree/CFLint-1.3.0) (2017-12-31)
[Full Changelog](https://github.com/cflint/CFLint/compare/CFLint-1.3.0-RC2...CFLint-1.3.0)

# CHANGE LOG
### Overview and major changes in [CFLint 1.3.0](https://github.com/cflint/CFLint/tree/CFLint1.3.0)

## [CFLint-1.3.0](https://github.com/cflint/CFLint/tree/CFLint-1.3.0) (2017-12-28)
[Full Changelog](https://github.com/cflint/CFLint/compare/CFLint-1.3.0-RC1...CFLint-1.3.0)
#### Linting

* Bugfixes for rule processing
* Fixes around NPEs being thrown during linting
* Improvements around handling Lucee vs. Adobe CFScript syntax
* Improvements and fixes with ignoring code (lines and blocks in mixed tag/script code)

#### Output

* Output of some rules has been improved and fixed
* Internal changes for output processing
* Timestamp issues in XML output sorted
* Ducumentation for output schemas

#### Internal

* Offset is now part of the BugInfo object
* Code quality / Java linting improvements
* CFLint Constants live in the own file now
* First implementation of a Java API for third-party tools

### Details

**Implemented enhancements:**

- Make variable, argument naming etc. configurable [\#492](https://github.com/cflint/CFLint/issues/492)
- Investigate and document rule inclusion/exclusion process and precedences [\#314](https://github.com/cflint/CFLint/issues/314)

**Fixed bugs:**

- thisTag is showing an warning [\#479](https://github.com/cflint/CFLint/issues/479)
- false positive MISSING\_VAR with cfdocumentsection name [\#462](https://github.com/cflint/CFLint/issues/462)

**Closed issues:**

- Suggestion : Un-document the -configfile parameter. [\#507](https://github.com/cflint/CFLint/issues/507)
- README: make sure ppl know we 're happy to add links to their related projects [\#411](https://github.com/cflint/CFLint/issues/411)

**Merged pull requests:**

- 382 gradle changelog automation [\#512](https://github.com/cflint/CFLint/pull/512) ([TheRealAgentK](https://github.com/TheRealAgentK))
- 507 undocument configfile [\#511](https://github.com/cflint/CFLint/pull/511) ([TheRealAgentK](https://github.com/TheRealAgentK))
- Updated README and schema in response to parameters [\#508](https://github.com/cflint/CFLint/pull/508) ([KamasamaK](https://github.com/KamasamaK))

## [CFLint-1.3.0-RC2](https://github.com/cflint/CFLint/tree/CFLint-1.3.0-RC2) (2017-12-28)
[Full Changelog](https://github.com/cflint/CFLint/compare/CFLint-1.3.0-RC1...CFLint-1.3.0-RC2)

**Implemented enhancements:**

Expand Down
119 changes: 81 additions & 38 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,25 +1,54 @@

buildscript {
repositories {
mavenLocal()
jcenter {
repositories {
mavenLocal()
jcenter {
url "http://jcenter.bintray.com/"
}
maven { url "http://oss.sonatype.org/content/repositories/snapshots/"
maven {
url "http://oss.sonatype.org/content/repositories/snapshots/"
}
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.bmuschko:gradle-nexus-plugin:2.3'
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.5.3"
classpath "gradle.plugin.se.bjurr.gitchangelog:git-changelog-gradle-plugin:1.50"
}
}
}
dependencies {
classpath 'com.bmuschko:gradle-nexus-plugin:2.3'
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.5.3"
classpath "gradle.plugin.se.bjurr.gitchangelog:git-changelog-gradle-plugin:1.50"
}
}

plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '1.2.4'
id 'eclipse'
id 'java'
id 'com.github.johnrengelman.shadow' version '1.2.4'
id 'eclipse'
}

// Helper functions and constants
def getLatestTag = { ->
try {
def stdout = new ByteArrayOutputStream()

String osName = System.getProperty('os.name').toLowerCase();

if (osName.contains('win')) {
//exec {
// commandLine 'cmd', '/c', 'hg.exe', 'parent', '--template', '{rev}'
// standardOutput = stdout
//}
} else if (osName.contains('mac')) {
exec {
commandLine "src/main/resources/scripts/getLatestTag.sh"
standardOutput = stdout
}
}
return stdout.toString()
}
catch (ignored) {
print("fail")
println(ignored.toString())
throw new GradleException('Git command to find latest tag failed')
}
}

apply plugin: "base"
Expand All @@ -43,21 +72,21 @@ repositories {
maven { url "http://cfmlprojects.org/artifacts" }
}
dependencies {
compile group: 'com.github.cfparser', name: 'cfml.parsing', version:'2.6.0'
compile group: 'commons-cli', name: 'commons-cli', version:'1.2'
compile group: 'ro.fortsoft.pf4j', name: 'pf4j', version:'0.6'
compile group: 'ant', name: 'ant', version:'1.7.0'
compile group: 'com.sun.xml.bind', name: 'jaxb-impl', version:'2.1.8'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version:'2.8.6'
compile group: 'com.fasterxml.jackson.module', name: 'jackson-module-jaxb-annotations', version:'2.8.6'
compile (group: 'net.java.dev.stax-utils', name: 'stax-utils', version: '20070216'){
compile group: 'com.github.cfparser', name: 'cfml.parsing', version: '2.6.0'
compile group: 'commons-cli', name: 'commons-cli', version: '1.2'
compile group: 'ro.fortsoft.pf4j', name: 'pf4j', version: '0.6'
compile group: 'ant', name: 'ant', version: '1.7.0'
compile group: 'com.sun.xml.bind', name: 'jaxb-impl', version: '2.1.8'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.8.6'
compile group: 'com.fasterxml.jackson.module', name: 'jackson-module-jaxb-annotations', version: '2.8.6'
compile(group: 'net.java.dev.stax-utils', name: 'stax-utils', version: '20070216') {
exclude module: 'jsr173-ri'
exclude module: 'jsr173'
}
// https://mvnrepository.com/artifact/commons-io/commons-io
compile group: 'commons-io', name: 'commons-io', version: '2.5'

testCompile group: 'junit', name: 'junit', version:'4.12'
testCompile group: 'junit', name: 'junit', version: '4.12'
}

test {
Expand All @@ -70,31 +99,45 @@ test {
}

jar {
manifest {
attributes(
'Main-Class': 'com.cflint.cli.CFLintCLI',
'Implementation-Version': version,
)
}
manifest {
attributes(
'Main-Class': 'com.cflint.cli.CFLintCLI',
'Implementation-Version': version,
)
}
}

task fatJar(type: Jar) {
manifest.from jar.manifest
classifier = 'all'
from {
configurations.runtime.collect { it.isDirectory() ? it : zipTree(it) }
} {
manifest.from jar.manifest
classifier = 'all'
from {
configurations.runtime.collect { it.isDirectory() ? it : zipTree(it) }
} {
exclude "META-INF/*.SF"
exclude "META-INF/*.DSA"
exclude "META-INF/*.RSA"
}
with jar
}
with jar
}

artifacts {
archives fatJar
}
task gitChangelogTask(type: se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask) {

task gitChangelog(type: se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask) {
group "documentation"

file = new File("CHANGELOG.md");
templateContent = file('src/main/resources/changelog.mustache').getText('UTF-8');
}

task githubChangelogGenerator {
group "documentation"

doLast {
def latestTag = getLatestTag()
def p = ['src/main/resources/scripts/writeChangelog.sh', latestTag].execute()
println p.text
}
}

2 changes: 2 additions & 0 deletions src/main/resources/scripts/getLatestTag.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
git tag -l --format="%(creatordate:iso8601)|%(refname:short)" | sort -r | head -n 1 | awk -F'|' '{print $2}'
2 changes: 2 additions & 0 deletions src/main/resources/scripts/writeChangelog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
/Users/kai/.rbenv/shims/github_changelog_generator -u cflint -p CFLint --token <github token> --output CHANGELOG.md --base CHANGELOG.md --no-unreleased --since-tag $1 --header-label

0 comments on commit accbb03

Please sign in to comment.