Skip to content

Commit

Permalink
Write VERSION file when building
Browse files Browse the repository at this point in the history
  • Loading branch information
beheh committed Jan 25, 2017
1 parent b5a6bd9 commit 2e9aace
Show file tree
Hide file tree
Showing 5 changed files with 192 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ node_modules
typings
dist

VERSION
enums.d.ts

# outdated, but keep around
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
### Added
- Write `VERSION` file when building

## [0.10.0] - 2017-01-16
### Added
Expand Down
9 changes: 8 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const gulp = require("gulp");
const gutil = require("gulp-util");
const gfile = require("gulp-file");
const plumber = require("gulp-plumber");

const sourcemaps = require("gulp-sourcemaps");
Expand Down Expand Up @@ -28,7 +29,7 @@ const path = require("path");
gulp.task("default", ["watch"]);

gulp.task("compile", ["compile:web"]);
gulp.task("compile:web", ["compile:scripts:web", "compile:styles", "html:web", "assets"]);
gulp.task("compile:web", ["compile:scripts:web", "compile:styles", "html:web", "assets", "version:write"]);
gulp.task("compile:dev", ["compile:scripts:dev", "compile:styles", "html:dev", "assets"]);

gulp.task("compile:scripts", ["compile:scripts:web"]);
Expand Down Expand Up @@ -97,6 +98,12 @@ gulp.task("env:set-release", function (cb) {
});
});

gulp.task("version:write", ["env:set-release"], function() {
const version = process.env.JOUST_RELEASE;
return gfile("VERSION", version, {src: true})
.pipe(gulp.dest("dist/"));
});

gulp.task("sentry:release", ["env:set-release"], function () {
var version = process.env.JOUST_RELEASE;
var key = "SENTRY_TOKEN";
Expand Down
180 changes: 180 additions & 0 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"git-describe": "^4.0.1",
"gulp": "^3.9.1",
"gulp-download": "0.0.1",
"gulp-file": "^0.3.0",
"gulp-filter": "^5.0.0",
"gulp-less": "^3.3.0",
"gulp-livereload": "^3.8.1",
Expand Down

0 comments on commit 2e9aace

Please sign in to comment.