-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines-windows.yml
52 lines (43 loc) · 1.65 KB
/
azure-pipelines-windows.yml
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
pool:
vmImage: 'windows-latest'
variables:
GRADLE_USER_HOME: $(Pipeline.Workspace)/.gradle
repositoryName: Account-Ledger-Cli-Kotlin-Gradle
steps:
- checkout: self
submodules: recursive
- task: [email protected]
inputs:
key: 'gradle | "$(Agent.OS)"'
restoreKeys: gradle
path: $(GRADLE_USER_HOME)
displayName: Gradle Build Cache
- task: JavaToolInstaller@0
inputs:
versionSpec: '21'
jdkArchitectureOption: 'x64'
jdkSourceOption: 'PreInstalled'
- task: [email protected]
displayName: 'Gradle Build : Tar Distribution'
inputs:
gradleOptions: '-Xmx3072m'
tasks: distTar
- script: 'gradlew --stop'
displayName: Stop Gradle Daemon
# TODO : If branch is not master : Extract folder, rename cli-app & cli-app.bat to Account-Ledger-CLI-$(Build.SourceName).bat, then repack as Account-Ledger-CLI-$(Build.SourceName).tar (Inner folders too); Otherwise Extract folder, rename cli-app & cli-app.bat to Account-Ledger-CLI.bat, then repack as Account-Ledger-CLI.tar (Inner folders too).
- task: Bash@3
inputs:
targetType: 'inline'
script: |
cd cli-app/build/distributions
tar -xvf cli-app.tar
mv cli-app Account-Ledger-Cli
cd Account-Ledger-Cli/bin
mv cli-app Account-Ledger-Cli
chmod a+x Account-Ledger-Cli
mv cli-app.bat Account-Ledger-Cli.bat
cd ../..
tar -czvf Account-Ledger-Cli.tar.gz Account-Ledger-Cli
displayName: Rebuilding Tar Distribution
- publish: cli-app/build/distributions/Account-Ledger-Cli.tar.gz
artifact: Account-Ledger-CLI