-
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.
* master: Restore use of testing tool #50 Fixed bug in the path parsing of .get #43: Cleanup, removing redundant logs and comments #43: getCleanPath instead of contextPathOverride and prefix #45: In prod mode, hide (swallow) 400 and 404 error messages. Only output them in XP dev mode. #44: Preventing keys with undefined values in response header. Fixed some tests Removed tests that don't verify lib-static functionality (caching ResourceService now does it) Commented out tests that won't run on existing XP Testing Tool (need to wait for XP 7.7 Testing Tool) Commenting out syntax error in test (which is incomplete anyway) Remove double quotation handling Static root resolution tweak #38: decodeURI solves URI encoding issue. Improving double-quoted etag handling, and charset on error responses. Etag doublequotes handling CR changes Refactored the EtagService, moving some checks out of it to clean the responsibility and dispense with the STATUS and handling - simplifying a lot. Now tests fail, rewriting those. Java implementation can be improved #30 new gradle wrapper Create enonic-gradle.yml # Conflicts: # src/main/resources/lib/enonic/static/index.es6 # src/test/java/lib/enonic/libStatic/etag/EtagServiceTest.java
- Loading branch information
Showing
10 changed files
with
269 additions
and
187 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 |
---|---|---|
@@ -0,0 +1,116 @@ | ||
name: Gradle Build | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
needs: release_notes | ||
if: always() | ||
steps: | ||
- uses: actions/checkout@v2.3.4 | ||
|
||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
|
||
- uses: actions/cache@v2.1.4 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- run: ./gradlew build | ||
|
||
- uses: codecov/codecov-action@v1.2.1 | ||
|
||
### PUBLISHING STEPS ### | ||
|
||
- name: Get publishing variables | ||
id: publish_vars | ||
uses: enonic/release-tools/publish-vars@master | ||
env: | ||
PROPERTIES_PATH: './gradle.properties' | ||
JAVA_HOME: '' | ||
|
||
- name: Fail on bad config | ||
if: steps.publish_vars.outputs.version == '' || steps.publish_vars.outputs.projectName == '' | ||
run: exit 1 | ||
|
||
- name: Publish | ||
if: ${{ github.ref == 'refs/heads/master' }} | ||
run: ./gradlew publish -PrepoKey=${{ steps.publish_vars.outputs.repo }} -PrepoUser=${{ secrets.ARTIFACTORY_USERNAME }} -PrepoPassword=${{ secrets.ARTIFACTORY_PASSWORD }} | ||
|
||
- name: Download changelog | ||
if: steps.publish_vars.outputs.release == 'true' | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: changelog | ||
|
||
- name: Create Release | ||
if: steps.publish_vars.outputs.release == 'true' | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.publish_vars.outputs.tag_name }} | ||
body_path: changelog.md | ||
prerelease: ${{ steps.publish_vars.outputs.prerelease == 'true' }} | ||
|
||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
if: "steps.create_release.outputs.upload_url != ''" | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: "build/libs/${{ steps.publish_vars.outputs.projectName }}-${{ steps.publish_vars.outputs.version }}.jar" | ||
asset_name: "${{ steps.publish_vars.outputs.projectName }}-${{ steps.publish_vars.outputs.version }}.jar" | ||
asset_content_type: application/java-archive | ||
|
||
- name: Write new snapshot version | ||
if: steps.publish_vars.outputs.release == 'true' | ||
uses: christian-draeger/write-properties@1.0.1 | ||
with: | ||
path: './gradle.properties' | ||
property: 'version' | ||
value: ${{ steps.publish_vars.outputs.nextSnapshot }} | ||
|
||
- name: Commit and push new version | ||
if: steps.publish_vars.outputs.release == 'true' | ||
uses: EndBug/add-and-commit@v6.2.0 | ||
with: | ||
add: ./gradle.properties | ||
message: 'Updated to next SNAPSHOT version' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
release_notes: | ||
runs-on: ubuntu-latest | ||
if: "(github.ref == 'refs/heads/master')" | ||
steps: | ||
- uses: actions/checkout@v2.3.4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Get previous release tag | ||
id: get_previous_release_tag | ||
run: | | ||
PREVIOUS_RELEASE_TAG=$(git tag --sort=-version:refname --merged | grep -E '^v([[:digit:]]+\.){2}[[:digit:]]+$' | head -1) | ||
echo ::set-output name=previous_release_tag::$PREVIOUS_RELEASE_TAG | ||
- name: Generate Release Notes | ||
uses: enonic/release-tools/generate-changelog@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
ZENHUB_TOKEN: ${{ secrets.ZENHUB_TOKEN }} | ||
PREVIOS_RELEASE_TAG: ${{ steps.get_previous_release_tag.outputs.previous_release_tag }} | ||
OUTPUT_FILE: changelog.md | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: changelog | ||
path: changelog.md |
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
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 @@ | ||
group = com.enonic.lib | ||
projectName = lib-static | ||
xpVersion = 7.5.0 | ||
xpVersion = 7.7.0-SNAPSHOT | ||
version=0.0.1-SNAPSHOT |
Oops, something went wrong.