Skip to content
This repository has been archived by the owner on Jun 15, 2021. It is now read-only.

Commit

Permalink
chore: vscode semantic release
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarTawfik committed Mar 7, 2019
1 parent 8ed265d commit 6aac339
Show file tree
Hide file tree
Showing 7 changed files with 288 additions and 31 deletions.
6 changes: 5 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Dependencies
node_modules/

# Misc
# Resources
README.md
CHANGELOG.md
*.png

# Misc
yarn.lock
.gitignore
.prettierignore
Expand Down
14 changes: 13 additions & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
{
"branch": "master",
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
[
"@semantic-release/npm",
{
"pkgRoot": "./out/linter"
}
],
[
"@semantic-release/git",
{
"assets": ["package.json", "CHANGELOG.md"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
[
"semantic-release-vsce",
{
"path": "./out/vscode"
}
],
"@semantic-release/github"
]
}
26 changes: 15 additions & 11 deletions gulpfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,26 @@

import * as gulp from "gulp";
import { BuildTasks } from "./scripts/gulp-build";
import { PackageTasks } from "./scripts/gulp-package";
import { PackageTasks } from "./scripts/gulp-linter";
import { VSCodeTasks } from "./scripts/gulp-vscode";

gulp.task(
"ci",
gulp.series([BuildTasks.clean, BuildTasks.compile, BuildTasks.prettier, BuildTasks.tslint, BuildTasks.jest]),
);
const npmPackageTask = "create-linter-package";
gulp.task(npmPackageTask, gulp.parallel([PackageTasks.copyFiles, PackageTasks.generatePackageJson]));

gulp.task(
"create-linter-package",
gulp.series([BuildTasks.clean, BuildTasks.compile, PackageTasks.copyFiles, PackageTasks.generatePackageJson]),
);
const vscodePackageTask = "create-vscode-package";
gulp.task(vscodePackageTask, gulp.parallel([VSCodeTasks.copyFiles, VSCodeTasks.generatePackageJson]));

gulp.task(
"create-vscode-package",
gulp.series([BuildTasks.clean, BuildTasks.compile, VSCodeTasks.copyFiles, VSCodeTasks.generatePackageJson]),
"ci",
gulp.series([
BuildTasks.clean,
BuildTasks.compile,
BuildTasks.prettier,
BuildTasks.tslint,
BuildTasks.jest,
npmPackageTask,
vscodePackageTask,
]),
);

gulp.task("default", gulp.parallel([BuildTasks.compile, BuildTasks.jest]));
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"prettier": "1.16.4",
"prettier-check": "2.0.0",
"semantic-release": "15.13.3",
"semantic-release-vsce": "2.2.6",
"ts-jest": "23.10.5",
"ts-node": "8.0.2",
"tslint": "5.12.1",
Expand Down
12 changes: 6 additions & 6 deletions scripts/gulp-package.ts → scripts/gulp-linter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@ import * as gulp from "gulp";
import * as merge from "gulp-merge-json";
import { outPath, rootPath } from "./gulp-utils";

const packagePath = path.join(outPath, "package");
const linterPath = path.join(outPath, "linter");

export module PackageTasks {
export const copyFiles = "package:copy-files";
export const generatePackageJson = "package:generate-package-json";
export const copyFiles = "linter:copy-files";
export const generatePackageJson = "linter:generate-package-json";
}

gulp.task(PackageTasks.copyFiles, () => {
return gulp.src([path.join(outPath, "src", "**"), path.join(rootPath, "README.md")]).pipe(gulp.dest(packagePath));
return gulp.src([path.join(outPath, "src", "**"), path.join(rootPath, "README.md")]).pipe(gulp.dest(linterPath));
});

gulp.task(PackageTasks.generatePackageJson, () => {
return gulp
.src([path.join(rootPath, "package.json"), path.join(rootPath, "scripts", "package-npm.json")])
.src([path.join(rootPath, "package.json"), path.join(rootPath, "scripts", "package-linter.json")])
.pipe(
merge({
fileName: "package.json",
}),
)
.pipe(gulp.dest(packagePath));
.pipe(gulp.dest(linterPath));
});
File renamed without changes.
Loading

0 comments on commit 6aac339

Please sign in to comment.