Skip to content
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

Remove gulp #323

Merged
merged 6 commits into from
Mar 4, 2022
Merged
Show file tree
Hide file tree
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
30 changes: 15 additions & 15 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Interested in contributing to the google-play-vsts-extension project? There are
* Submit a code fix for a bug (see `Submitting Pull Requests` below)
* Participate in [discussions](https://github.com/Microsoft/google-play-vsts-extension/issues)

## Set up Node, npm and gulp
## Set up Node and npm

### Node and npm
**Windows and Mac OSX**: Download and install node from [nodejs.org](http://nodejs.org/)
Expand All @@ -23,26 +23,26 @@ v6.9.1
3.10.8
```

### Gulp
Install gulp
```bash
[sudo] npm install gulp -g
```
From the root of the repo, install all of the build dependencies:
```bash
[sudo] npm install
```

## Build
To build the extension, run the following from the root of the repo:

```bash
gulp
node make.js build
```
This command will create the _build folder at the root of the repository.

If you open the root of the repository in Visual Studio Code, you can build with Ctrl+Shift+B.

## Tests
Tests should be run with changes. Before you run tests, make sure you have built the extension. Run the following from the root of the repo:

```bash
node make.js test
```
To run the tests within Visual Studio Code, select the Debug viewlet, change the debug profile to "Launch L0 Tests", set a breakpoint directly in the
L0.js file (e.g., _build/Tasks/GooglePlayPromoteV2/Tests/L0.js) and press `F5`. At this time, you cannot debug the task itself during tests as a second
node process is created (in which the task is run).

### Testing task changes
In order to test your task changes, you will need to upload the new task to your own account and test it with a build definition. First, create a build definition
you can use to test your changes. Then, after building the task you changed, upload the task to your account. To upload a task, you will need to install the
Expand All @@ -62,12 +62,12 @@ The package command will package the extension into a Visual Studio extension in

From the root of the repo:
```bash
gulp create
node make.js create
```
The VSIX package will be created in the root of the repository.

## Code Styles
1. gulp build will run `tslint` and flag any errors. Please ensure that the code stays clean.
1. node make.js build will run `tslint` and flag any errors. Please ensure that the code stays clean.

## Contribution License Agreement
In order to contribute, you will need to sign a [Contributor License Agreement](https://cla.microsoft.com/).
Expand All @@ -78,4 +78,4 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope
## Submitting Pull Requests
We welcome pull requests! Fork this repo and send us your contributions. Go [here](https://help.github.com/articles/using-pull-requests/) to get familiar with GitHub pull requests.

Before submitting your request, ensure that `gulp` succeeds and you have verified the task changes manually.
Before submitting your request, ensure that both `node make.js build` and `node make.js test` succeed.
139 changes: 0 additions & 139 deletions gulpfile.js

This file was deleted.

24 changes: 24 additions & 0 deletions make-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -1133,4 +1133,28 @@ var getTaskNodeVersion = function(buildPath, taskName) {
}
exports.getTaskNodeVersion = getTaskNodeVersion;

var toOverrideString = function(object) {
return JSON.stringify(object).replace(/"/g, '\\"');
}

exports.toOverrideString = toOverrideString;

var createExtension = function(manifest, publish) {
matchRemove('**/Tests', path.join(__dirname, '_build/Tasks/'));
matchRemove('**/*.js.map', path.join(__dirname, '_build/Tasks/'));
matchRemove('**/*.d.ts', path.join(__dirname, '_build/Tasks/'));

console.log('Creating vsix...');

var createCommand = "node ./node_modules/tfx-cli/_build/app.js extension create --manifest-globs vsts-extension-google-play.json --override " + toOverrideString(manifest);

if (publish === true) {
createCommand += " --share-with mobiledevops x04ty29er --token $PUBLISH_ACCESSTOKEN"
}

run(createCommand);
}

exports.createExtension = createExtension;

//------------------------------------------------------------------------------
37 changes: 37 additions & 0 deletions make.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ var createResjson = util.createResjson;
var createTaskLocJson = util.createTaskLocJson;
var validateTask = util.validateTask;
var getTaskNodeVersion = util.getTaskNodeVersion;
var createExtension = util.createExtension;

// global paths
var buildPath = path.join(__dirname, '_build', 'Tasks');
Expand Down Expand Up @@ -304,3 +305,39 @@ target.test = function() {
}
}
}

target.create = function() {
banner('Creating PRODUCTION vsix...');

var prodManifestOverride = {
public: true
};

createExtension(prodManifestOverride, false);
}

target.createtest = function() {
banner('Creating TEST vsix...');

var createtestOverride = {
public: false,
name: "Google Play-Dev",
id: "vso-extension-android-dev",
publisher: "ms-mobiledevops-test"
};

createExtension(createtestOverride, false);
}

target.publishtest = function() {
banner('Creating and publishing TEST vsix...');

var createPublishOverride = {
public: false,
name: "Google Play-Dev",
id: "vso-extension-android-dev",
publisher: "ms-mobiledevops-test"
};

createExtension(createPublishOverride, true);
}
Loading