Skip to content

Commit

Permalink
Removes the CLI package (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
akshay-madhukar authored Jan 3, 2023
1 parent 0e55af3 commit aed8124
Show file tree
Hide file tree
Showing 18 changed files with 1 addition and 10,044 deletions.
69 changes: 1 addition & 68 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,61 +98,11 @@ stages:
targetFolder: $(Build.ArtifactStagingDirectory)/core
displayName: 'Copy @itwin/pcf'

# @itwin/pcf-cli build

- script: |
npm ci
displayName: 'npm ci'
workingDirectory: cli
- script: |
# I don't understand this. Isn't this a no-op if the second form isn't used: `npm link --help`?
npm link
displayName: 'npm link'
workingDirectory: cli
- bash: |
cp ../LICENSE .
npm pack
displayName: 'npm pack'
workingDirectory: cli
- task: CopyFiles@2
inputs:
sourceFolder: cli
contents: '*.tgz'
targetFolder: $(Build.ArtifactStagingDirectory)/cli
displayName: 'Copy @itwin/pcf-cli'

# TestConnector build

- script: |
pcf init TestProject TestConnector TestClientId TestClientRedirectUri TestClientScope TestProjectId TestIModelId
displayName: 'pcf init'
workingDirectory: cli
- bash: |
# Satisfy PCF and peer dependencies in iTwin.
# npm installing a local modules does not automatically install its dependencies
npm install ../../core
npm install ../../core/node_modules/@itwin/core-backend
npm install ../../core/node_modules/@itwin/core-common
npm install ../../core/node_modules/@itwin/ecschema-metadata
displayName: 'Link local dependencies'
workingDirectory: cli/TestProject
- script: |
npm run build
displayName: 'Build Generated Connector'
workingDirectory: cli/TestProject
# publish artifact

- bash: |
coreVer=$(node -p "require('./core/package.json').version")
coreName=$(node -p "require('./core/package.json').name")
cliVer=$(node -p "require('./cli/package.json').version")
cliName=$(node -p "require('./cli/package.json').name")
checkVer() {
localVer=$1
Expand All @@ -172,9 +122,8 @@ stages:
}
updateCore=$(checkVer $coreVer $coreName)
updateCli=$(checkVer $cliVer $cliName)
if [ "$updateCore" = "true" ] && [ "$updateCore" = "$updateCli" ] && [ "$coreVer" = "$cliVer" ]; then
if [ "$updateCore" = "true" ]; then
echo "package publishing conditions are met."
shouldPublish=true
else
Expand All @@ -185,8 +134,6 @@ stages:
echo "##vso[task.setvariable variable=shouldPublish;isOutput=true]$shouldPublish"
echo "##vso[task.setvariable variable=coreVer;isOutput=true]$coreVer"
echo "##vso[task.setvariable variable=coreName;isOutput=true]$coreName"
echo "##vso[task.setvariable variable=cliVer;isOutput=true]$cliVer"
echo "##vso[task.setvariable variable=cliName;isOutput=true]$cliName"
displayName: 'Store Build Info'
name: info
Expand All @@ -196,10 +143,7 @@ stages:
echo "shouldPublish: $(info.shouldPublish)"
echo "coreVer: $(info.coreVer)"
echo "coreName: $(info.coreName)"
echo "cliVer: $(info.cliVer)"
echo "cliName: $(info.cliName)"
ls
ls cli
ls core
displayName: 'Show Build Info'
condition: and(succeeded(), eq(variables['info.shouldPublish'], 'true'))
Expand All @@ -211,12 +155,6 @@ stages:
displayName: 'Publish PCF Core Artifact'
condition: and(succeeded(), eq(variables['info.shouldPublish'], 'true'))

- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/cli'
artifactName: cli
displayName: 'Publish PCF Cli Artifact'
condition: and(succeeded(), eq(variables['info.shouldPublish'], 'true'))

- stage: Publish
displayName: Publish
Expand All @@ -229,8 +167,3 @@ stages:
path: '*.tgz'
artifactName: core
name: core
- template: templates/npmjs-publish-deployment.yaml@build-pipeline-scripts
parameters:
path: '*.tgz'
artifactName: cli
name: cli
24 changes: 0 additions & 24 deletions cli/.gitignore

This file was deleted.

27 changes: 0 additions & 27 deletions cli/README.md

This file was deleted.

2 changes: 0 additions & 2 deletions cli/bin/pcf

This file was deleted.

59 changes: 0 additions & 59 deletions cli/bin/pcf.js

This file was deleted.

Loading

0 comments on commit aed8124

Please sign in to comment.