Skip to content

Merge back #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 4, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,28 @@
[![NPM@dev](https://img.shields.io/npm/v/gl-vsts-tasks-build-scripts/dev.svg)](https://www.npmjs.com/package/gl-vsts-tasks-build-scripts/v/dev)
[![NPM@latest](https://img.shields.io/npm/v/gl-vsts-tasks-build-scripts/latest.svg?color=green)](https://www.npmjs.com/package/gl-vsts-tasks-build-scripts/v/latest)

This package provides npm utility commands to ease **Azure Pipelines Tasks** extensions developement.
This package provides NPM utility commands to ease **Azure Pipelines Tasks** extensions developement.
This currently powers the development process behind [Geek Learning's extensions](https://marketplace.visualstudio.com/publishers/geeklearningio).

## Features

* **Multiple packages generation** : This allows you to generate testing versions of the extension using unique ids, so you can easily
test your extension and setup staged deployment to the store. At Geek Learning our CI builds 3 versions of the extension
(Dev, Preview, Production) and stores them as build artifacts. We then use Release Management to publish them to the marketplace.
(Dev, Preview, Production) and stores them as build artifacts. We then use Release Pipelines to publish them to the marketplace.
Dev package is always published automatically upon successfull build. Preview and Production are manually pushed if it passes our
final review. Ids and packages settings, are defined in the `Configuration.json` file
* **Manifest automation** : We automatically populate the contributions in the vss-extension in order to reduced manual maintainance
of this file.
* **Common shared code** : We provide an easy way to share powershell or node scripts accros your tasks without the need to make a
package of them. Place them in the right subfolder of `Common` and they will be automatically copied where appropriate on build.
* **Node : Automic dependency installation** : Vsts Agent node execution engine requires npm dependencies to be bundled with your task
* **Node : Automic dependency installation** : Azure Pipelines Agent node execution engine requires npm dependencies to be bundled with your task
We automatically install two dependencies as a postbuild step after a successfull `npm install` at root.
* **Automatic versionning** : Visual Studio Marketplace does not support semver, but we always rely on it when it comes to versionnning.
As a result we needed a way to encode our semver to a Major.Minor.Patch format. This feature can be switched of if you rely on another
source of versionning.
As a result we needed a way to encode our semver to a Major.Minor.Patch format. This feature can be switched of if you rely on another source of versionning.

## Project structure

At the moment, if you wish to use this tooling, your project will need to comply with the architecture we designed.

Directory Structure
```
Root
|-- package.json
Expand Down Expand Up @@ -84,10 +81,14 @@ Then to get the best of this tooling we recommand that you tweak your `package.j
```

You can now restore or update dependencies and task bundled dependencies by running a single `npm install` at the root.

You can clean common files using `npm run clean`

You can build node tasks using `npm run build`

You can package your extension by running `npm run package`. Output will be placed in the `.BuildOutput` subdirectory at root.

### Versioning
## Versioning
You can set version by packaging with `npm run package -- --version <version>`.

You can disable the default behavior which would encode the semver metadata into the patch component with the additional flag `--noversiontransform`.