Skip to content

Commit

Permalink
build: file restructuring (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
woehrl01 authored Apr 19, 2022
1 parent ad37243 commit e2daad6
Show file tree
Hide file tree
Showing 57 changed files with 3,540 additions and 6,345 deletions.
7 changes: 4 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ module.exports = {
rules: {
'eqeqeq': ['error', 'smart'],
'class-methods-use-this': 'warn',
'no-shadow': 'error',
'@typescript-eslint/no-shadow': 'error',
'no-restricted-syntax': 'error',
'react/react-in-jsx-scope': 'off',
'no-var': 'error',
'@typescript-eslint/explicit-function-return-type': 'error',
'quotes': ['error', 'single'],
'@typescript-eslint/quotes': ['warn', 'single'],
'@typescript-eslint/no-unused-vars': ['warn', { 'argsIgnorePattern': '^_' }]
}
};
};
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"html.validate.scripts": false,
}
21 changes: 3 additions & 18 deletions azure-pipelines.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@ parameters:
- name: buildPostfix
type: string
default: ''
- name: PAT
type: string
- name: AdditionalCommandArgs
- name: additionalCommandArgs
type: string
default: ''
- name: Version
type: string
- name: BaseUri
- name: baseUri
type: string
default: ''

Expand All @@ -22,23 +18,12 @@ steps:
- script: npm install -g [email protected]
displayName: 'Use [email protected]'

- task: Cache@2
inputs:
key: 'npm | "$(Agent.OS)" | package-lock.json'
restoreKeys: |
npm | "$(Agent.OS)"
path: $(npm_config_cache)
displayName: Cache npm

- script: npm ci
displayName: 'Install dependencies'

- script: npm run build${{ parameters.buildPostfix }}
displayName: 'Run build'

- script: |
npm run publish-extension${{ parameters.buildPostfix }} -- -t "${{ parameters.PAT }}" --override '{"version":"${{ parameters.Version }}","baseUri":"${{ parameters.BaseUri }}"}' ${{ parameters.AdditionalCommandArgs }}
npm run publish-extension${{ parameters.buildPostfix }} -- -t "$(PUBLISH_TOKEN)" --override '{"version":"$(version)","baseUri":"${{ parameters.baseUri }}"}' ${{ parameters.additionalCommandArgs }}
displayName: 'Publish extension'



17 changes: 8 additions & 9 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
variables:
isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
version: $[format('1.1.{0}', variables['Build.BuildId'])]
major: 1
minor: 4
patch: $[counter(format('{0}.{1}-{2}', variables['major'], variables['minor'], variables['isMain']), 0)]
version: $[format('{0}.{1}.{2}', variables['major'], variables['minor'], variables['patch'])]
npm_config_cache: $(Pipeline.Workspace)/.npm

pool:
vmImage: 'ubuntu-18.04'
vmImage: 'ubuntu-latest'

stages:
- stage: Dev
Expand All @@ -15,17 +18,13 @@ stages:
- template: azure-pipelines.template.yml
parameters:
buildPostfix: ':dev'
PAT: $(PUBLISH_TOKEN)
AdditionalCommandArgs: '--share-with $(DEV_TEAM)'
Version: $(version)
BaseUri: $(DEV_BASE_URI)
additionalCommandArgs: '--share-with $(DEV_TEAM)'
baseUri: $(DEV_BASE_URI)

- stage: Prod
condition: eq(variables.isMain, 'true')
jobs:
- job: Publish
steps:
- template: azure-pipelines.template.yml
parameters:
PAT: $(PUBLISH_TOKEN)
Version: $(version)

2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ declare module '*.png' {
export default value;
}

declare module '*.scss' {
declare module '*.module.scss' {
const classes: { [key: string]: string };
export default classes;
}
3 changes: 1 addition & 2 deletions azure-devops-extension.common.json → manifest.common.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"manifestVersion": 1,
"publisher": "lukaswoehrl",
"version": "1.0.0",
"description": "Display linked documents on an additional tab at the work item form for direct viewing.",
"categories": [
"Azure Boards"
Expand Down Expand Up @@ -44,4 +43,4 @@
"addressable": true
}
]
}
}
File renamed without changes.
7 changes: 2 additions & 5 deletions azure-devops-extension.prod.json → manifest.prod.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"id": "azdo-workitem-documents",
"name": "Work Item Embedded Documents",
"public": true,
"galleryFlags": [
"Preview"
]
}
"public": true
}
4 changes: 0 additions & 4 deletions newrelic.apm.js

This file was deleted.

Loading

0 comments on commit e2daad6

Please sign in to comment.