-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
88 lines (72 loc) · 2.33 KB
/
azure-pipelines.yml
File metadata and controls
88 lines (72 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Node.js
# Build a general Node.js project with npm.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
GitVersion.SemVer: ''
steps:
- task: UseGitVersion@5
inputs:
versionSpec: '5.x'
updateAssemblyInfo: false
displayName: gitversion
- task: RegExMatchReplace@2
inputs:
PathToFile: '$(Build.SourcesDirectory)/package.json'
RegEx: '"version":\s*"\d+\.\d+\.\d"'
ValueToReplace: '"version": "$(GitVersion.SemVer)"'
- task: RegExMatchReplace@2
inputs:
PathToFile: '$(Build.SourcesDirectory)/package.json'
RegEx: '_@vsix@_'
ValueToReplace: './jungeriusit.jungit-robocopy-$(GitVersion.SemVer).vsix'
- task: RegExMatchReplace@2
inputs:
PathToFile: '$(Build.SourcesDirectory)/vss-extension.json'
RegEx: '"version":\s*"\d+\.\d+\.\d"'
ValueToReplace: '"version": "$(GitVersion.SemVer)"'
- task: RegExMatchReplace@2
inputs:
PathToFile: '$(Build.SourcesDirectory)/Task/task.json'
RegEx: '"Major":\s*\d+'
ValueToReplace: '"Major": "$(GitVersion.Major)"'
- task: RegExMatchReplace@2
inputs:
PathToFile: '$(Build.SourcesDirectory)/Task/task.json'
RegEx: '"Minor":\s*\d+'
ValueToReplace: '"Minor": "$(GitVersion.Minor)"'
- task: RegExMatchReplace@2
inputs:
PathToFile: '$(Build.SourcesDirectory)/Task/task.json'
RegEx: '"Patch":\s*\d+'
ValueToReplace: '"Patch": "$(GitVersion.Patch)"'
- task: RegExMatchReplace@2
inputs:
PathToFile: '$(Build.SourcesDirectory)/BackupTask/task.json'
RegEx: '"Major":\s*\d+'
ValueToReplace: '"Major": "$(GitVersion.Major)"'
- task: RegExMatchReplace@2
inputs:
PathToFile: '$(Build.SourcesDirectory)/BackupTask/task.json'
RegEx: '"Minor":\s*\d+'
ValueToReplace: '"Minor": "$(GitVersion.Minor)"'
- task: RegExMatchReplace@2
inputs:
PathToFile: '$(Build.SourcesDirectory)/BackupTask/task.json'
RegEx: '"Patch":\s*\d+'
ValueToReplace: '"Patch": "$(GitVersion.Patch)"'
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
- script: |
npm install
npm version $(GitVersion.SemVer)
npm run build
displayName: 'npm install and build'
- publish: $(System.DefaultWorkingDirectory)/
artifact: VsixPackage