Skip to content

Commit

Permalink
Merge pull request #4 from polarityio/develop
Browse files Browse the repository at this point in the history
Updating Summary Spans
  • Loading branch information
radar989 committed Oct 29, 2020
2 parents 944155c + c194ba8 commit a5b41a8
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 18 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/release-current-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# This workflow will run on merge of a PR or push to master
# It will run the integration developement checklist and if that passes
# creates a new release with the Release and Tag name both being the
# package.json version and will with a created tgz file and the SHA256 has in the release body


name: Release Current Version

on:
push:
branches: [ master ]

jobs:
release-current-version:
runs-on: ubuntu-latest
container: 'centos:7'

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- name: Get NPM Version
id: package-version
uses: martinbeentjes/npm-get-version-action@95bc31c6dd3145896c110e382f840bb1e750d09c
- name: Create Build
id: create_build
run: |
npm install &&
cd .. &&
tar --exclude="./${{ github.event.repository.name }}/.git" --exclude="./${{ github.event.repository.name }}/.gitignore" --exclude="./${{ github.event.repository.name }}/package-lock.json" --exclude="./${{ github.event.repository.name }}/.github" -czvf "${{ github.event.repository.name }}-${{ steps.package-version.outputs.current-version }}.tgz" "./${{ github.event.repository.name }}" &&
echo "::set-output name=build_hash::$(sha256sum '${{ github.event.repository.name }}-${{ steps.package-version.outputs.current-version }}.tgz' | grep -oE '^[^ ]*' )" &&
cd ${{ github.event.repository.name }}
- name: Polarity Integration Development Checklist
id: int-dev-checklist
uses: polarityio/polarity-integration-development-checklist@v1.0.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Versioned Release
id: create_versioned_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.package-version.outputs.current-version}}
release_name: ${{ steps.package-version.outputs.current-version}}
body: |
SHA256: ${{ steps.create_build.outputs.build_hash }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_versioned_release.outputs.upload_url }}
asset_path: ../${{ github.event.repository.name }}-${{ steps.package-version.outputs.current-version}}.tgz
asset_name: ${{ github.event.repository.name }}-${{ steps.package-version.outputs.current-version}}.tgz
asset_content_type: application/gzip
27 changes: 27 additions & 0 deletions .github/workflows/run-int-dev-checklist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This workflow will run on a Pull Request is created on both master develop
# It run as series of checks from the Integration Developement Checklist


name: Run Integration Development Checklist

on:
pull_request:
branches: [ master, develop ]

jobs:
run-integration-development-checklist:
runs-on: ubuntu-latest
container: 'centos:7'

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- name: Test NPM Install
id: test-npm-install
run: |
npm install
- name: Polarity Integration Development Checklist
id: int-dev-checklist
uses: polarityio/polarity-integration-development-checklist@v1.0.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"main": "./integration.js",
"name": "LDAP",
"description": "Polarity LDAP Integration",
"version": "3.4.3-beta",
"version": "3.4.4-beta",
"license": "MIT",
"author": "Polarity",
"private": true,
Expand Down
34 changes: 17 additions & 17 deletions templates/ldap-summary.hbs
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{{#each summaryAttributes as |attribute|}}
<span class="integration-summary-tag integration-background-color integration-border-color">
<span class="acronym integration-text-bold-color">{{block.acronym}}</span>
<span class="integration-text-color">
{{humanize (dasherize attribute.display)}}:
{{#if (eq attribute.type 'date')}}
{{moment-format attribute.value 'L LTS' timeZone=timezone}}
{{else if (eq attribute.type 'array')}}
{{#each attribute.value as | value |}}
<span class="array-item">{{value}}</span>
{{/each}}
{{else}}
{{attribute.value}}
{{/if}}
</span>
</span>
{{/each}}
{{#each summaryAttributes as |attribute|}}
<span {{on "click" (optional this.scrollToIntegration)}} class="integration-summary-tag integration-background-color integration-border-color">
<span class="acronym integration-text-bold-color">{{block.acronym}}</span>
<span class="integration-text-color">
{{humanize (dasherize attribute.display)}}:
{{#if (eq attribute.type 'date')}}
{{moment-format attribute.value 'L LTS' timeZone=timezone}}
{{else if (eq attribute.type 'array')}}
{{#each attribute.value as | value |}}
<span class="array-item">{{value}}</span>
{{/each}}
{{else}}
{{attribute.value}}
{{/if}}
</span>
</span>
{{/each}}

0 comments on commit a5b41a8

Please sign in to comment.