Skip to content

Commit

Permalink
Cleanup publish process
Browse files Browse the repository at this point in the history
Use canonical project to patch

Adjust headerParserRegex to capture format

Customize publishing

Adjust changelog
  • Loading branch information
cedricziel committed Apr 18, 2021
1 parent 209140d commit 91e6049
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
# Set output from previous step
export "ORG_GRADLE_PROJECT_pluginVersion=${{ steps.properties.outputs.prefixed-version }}"
./gradlew publishPlugin
./gradlew :typo3-cms:patchChangelog :typo3-cms:publishPlugin :lang-fluid:publishPlugin :lang-typoscript:publishPlugin
# Patch changelog, commit and push to the current repository
changelog:
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

## [Unreleased]
### Added

### Changed
- Improve publishing through GitHub actions
- Grab version number from changelog correctly
- Use "nightly" channel for TypoScript and Fluid projects
- Fix syntax of release task

### Deprecated

### Removed

### Fixed

### Security
## [0.7.0]
### Added
- Use GitHub actions to build plugin instead of travis
- c2b9eca [T3CMS] allowed TCA field can contain CSV string of tables (#351) (Cedric Ziel)
- f7e3bb4 [T3CMS] Create convenience method to get locale (#350) (Cedric Ziel)
Expand Down
14 changes: 2 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ repositories {
}

def htmlFixer = { htmlFile -> file(htmlFile).text.replace('<html>', '').replace('</html>', '') }
def getDate() {
def date = new Date()
def formattedDate = date.format('yyyy-MM-dd')
return formattedDate
}

group pluginGroup

Expand Down Expand Up @@ -45,8 +40,7 @@ subprojects {
changelog {
version = pluginVersion
path = "${project.rootProject.projectDir}/CHANGELOG.md"
header = { "[$version] - ${getDate()}" }
headerParserRegex = ~/\d+\.\d+/
headerParserRegex = ~/\d+\.\d+\.\d+/
itemPrefix = "-"
keepUnreleasedSection = true
unreleasedTerm = "[Unreleased]"
Expand All @@ -64,10 +58,6 @@ subprojects {
}
}

publishPlugin {
token System.getenv('IJ_REPO_TOKEN')
}

patchPluginXml {
if (customSinceBuild) {
sinceBuild customSinceBuild
Expand All @@ -76,7 +66,7 @@ subprojects {
untilBuild customUntilBuild
}

changeNotes({ changelog.getUnreleased().toHTML() })
changeNotes changelog.getUnreleased().toHTML()
pluginDescription htmlFixer("${project.projectDir}/src/main/resources/META-INF/description.html")
}

Expand Down
5 changes: 5 additions & 0 deletions lang-fluid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ intellij {
]
}

publishPlugin {
channels ["nightly"]
token System.getenv('PUBLISH_TOKEN')
}

task generateFluidLexer(type: GenerateLexer) {
source = "src/main/grammars/FluidLexer.flex"
targetDir = "gen/com/cedricziel/idea/fluid/lang/lexer"
Expand Down
5 changes: 5 additions & 0 deletions lang-typoscript/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ intellij {
]
}

publishPlugin {
channels ["nightly"]
token System.getenv('PUBLISH_TOKEN')
}

task generateTypoScriptLexer(type: GenerateLexer) {
source = "src/main/grammars/TypoScriptLexer.flex"
targetDir = "gen/com/cedricziel/idea/typoscript/lang/lexer"
Expand Down
5 changes: 5 additions & 0 deletions typo3-cms/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ intellij {
plugins = requiredPlugins
}

publishPlugin {
channels ["default"]
token System.getenv('PUBLISH_TOKEN')
}

sourceSets {
main.resources.srcDirs += [ "src/main/java" ]
test {
Expand Down

0 comments on commit 91e6049

Please sign in to comment.