Skip to content

Commit

Permalink
Dynamic manifest for dev
Browse files Browse the repository at this point in the history
  • Loading branch information
GrimaceOfDespair committed Jul 10, 2024
1 parent 74a6d28 commit 2fd7e63
Show file tree
Hide file tree
Showing 7 changed files with 109 additions and 127 deletions.
37 changes: 0 additions & 37 deletions azure-devops-extension-dev.json

This file was deleted.

99 changes: 99 additions & 0 deletions azure-devops-extension.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
module.exports = (env) => {

const isDevelopment = env.mode == 'development';

const [id, name] = isDevelopment
? ['spotcheck-dev', 'SpotCheck Dev']
: ['spotcheck', 'SpotCheck'];

let manifest = {
manifestVersion: 1,
id,
name,
publisher: 'igorkalders',
version: '1.0.0',
description: 'Enable screenshots spot checks from your application right from within Azure DevOps',
categories: [
'Azure Pipelines'
],
targets: [
{
id: 'Microsoft.VisualStudio.Services'
}
],
icons: {
default: 'logo.png'
},
content: {
details: {
path: 'overview.md'
}
},
files: [
{
path: 'dist',
addressable: true
}
],
scopes: [
'vso.build',
'vso.extension.default',
'vso.work',
'vso.code_write'
],
contributions: [
{
id: 'spotcheck-build',
type: 'ms.vss-build-web.build-results-tab',
targets: [
'ms.vss-build-web.build-results-view'
],
properties: {
name: 'SpotCheck',
uri: 'dist/SpotCheck/SpotCheck.html',
order: 100,
height: 400
},
constraints: [
{
name: 'Feature',
properties: {
featureId: `${id}.spotcheck-toggle`
}
}
]
},
{
id: 'spotcheck-toggle',
type: 'ms.vss-web.feature',
description: 'Show SpotCheck on build pipelines',
targets: [
'ms.vss-web.managed-features'
],
properties: {
name: 'SpotCheck',
userConfigurable: true,
hostConfigurable: true
}
},
{
id: 'spotcheck-config-hub',
type: 'ms.vss-web.hub',
targets: [
'ms.vss-web.project-admin-hub-group'
],
properties: {
name: 'SpotCheck Configuration',
order: 30,
uri: 'dist/Config/Config.html'
}
}
]
}

if (isDevelopment) {
manifest.baseUri = 'https://localhost:3000';
}

return manifest;
}
36 changes: 0 additions & 36 deletions azure-devops-extension.json

This file was deleted.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
"build": "npm run compile",
"build:dev": "npm run compile:dev && npm run postbuild",
"postbuild": "npm run package-extension:dev -- --rev-version",
"package-extension": "tfx extension create --manifest-globs azure-devops-extension.json src/**/*.json",
"package-extension:dev": "tfx extension create --manifest-globs azure-devops-extension-dev.json src/**/*.json",
"publish-extension": "tfx extension publish --manifest-globs azure-devops-extension.json src/**/*.json",
"publish-extension:dev": "tfx extension publish --manifest-globs azure-devops-extension-dev.json src/**/*.json",
"package-extension": "tfx extension create --manifest-js azure-devops-extension.js --env mode=production --overrides-file version.json",
"package-extension:dev": "tfx extension create --manifest-js azure-devops-extension.js --env mode=development --overrides-file version-dev.json",
"publish-extension": "tfx extension publish --manifest-js azure-devops-extension.js --env mode=production --overrides-file version.json",
"publish-extension:dev": "tfx extension publish --manifest-js azure-devops-extension.js --env mode=development --overrides-file version-dev.json",
"test": "cross-env TEST_REPORT_FILENAME=test-results.xml jest --verbose",
"start:dev": "webpack-dev-server --mode development"
},
Expand Down
50 changes: 0 additions & 50 deletions src/SpotCheck/SpotCheck.json

This file was deleted.

3 changes: 3 additions & 0 deletions version-dev.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"version": "1.0.11"
}
3 changes: 3 additions & 0 deletions version.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"version": "1.0.8"
}

0 comments on commit 2fd7e63

Please sign in to comment.