publishing
This commit is contained in:
36
Yavsc/Makefile
Normal file
36
Yavsc/Makefile
Normal file
@ -0,0 +1,36 @@
|
||||
DESTDIR=/srv/www/yavscpre
|
||||
PRODDESTDIR=/srv/www/yavsc
|
||||
|
||||
default: pushInPre
|
||||
|
||||
cleanRelease:
|
||||
rm -rf bin/Release
|
||||
|
||||
cleanoutput:
|
||||
rm -rf bin/output
|
||||
|
||||
clean: cleanoutput cleanRelease
|
||||
gulp clean
|
||||
|
||||
bin/Release:
|
||||
dnu build --configuration=Release
|
||||
|
||||
bin/output: bin/Release
|
||||
dnu publish
|
||||
|
||||
bin/output/wwwroot/version: bin/output
|
||||
git log -1 --pretty=format:%h > bin/output/wwwroot/version
|
||||
|
||||
pushInPre: bin/output/wwwroot/version
|
||||
ssh root@localhost systemctl stop kestrel-pre
|
||||
ssh root@localhost rm -rf $(DESTDIR)/approot
|
||||
(cd bin/output && rsync -ravu ./ root@localhost:$(DESTDIR) >/dev/null)
|
||||
ssh root@localhost sync
|
||||
ssh root@localhost systemctl start kestrel-pre
|
||||
|
||||
push: bin/output/wwwroot/version
|
||||
ssh root@localhost systemctl stop kestrel
|
||||
ssh root@localhost rm -rf $(PRODDESTDIR)/approot
|
||||
(cd bin/output && rsync -ravu ./ root@localhost:$(PRODDESTDIR) >/dev/null)
|
||||
ssh root@localhost sync
|
||||
ssh root@localhost systemctl start kestrel
|
@ -2,8 +2,7 @@
|
||||
<script src="~/lib/jquery-validation/jquery.validate.js"></script>
|
||||
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js"></script>
|
||||
</environment>
|
||||
<script src="~/lib/jquery-validation/additional-methods.js" charset="UTF-8"></script>
|
||||
<environment names="Staging,Production,yavsc,yavscpre,zicmoove,lua">
|
||||
<environment names="yavsc,yavscpre,zicmoove,lua,coiffure">
|
||||
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.14.0/jquery.validate.min.js"
|
||||
asp-fallback-src="~/lib/jquery-validation/jquery.validate.min.js"
|
||||
asp-fallback-test="window.jQuery && window.jQuery.validator">
|
||||
@ -13,3 +12,4 @@
|
||||
asp-fallback-test="window.jQuery && window.jQuery.validator && window.jQuery.validator.unobtrusive">
|
||||
</script>
|
||||
</environment>
|
||||
<script src="~/lib/jquery-validation/additional-methods.js" charset="UTF-8"></script>
|
||||
|
@ -3,11 +3,11 @@
|
||||
|
||||
var gulp = require("gulp"),
|
||||
rimraf = require("rimraf"),
|
||||
// concat = require("gulp-concat"),
|
||||
cssmin = require("gulp-cssmin"),
|
||||
uglify = require("gulp-uglify"),
|
||||
shell = require("gulp-shell"),
|
||||
rename = require('gulp-rename');
|
||||
rename = require('gulp-rename'),
|
||||
clean = require('gulp-clean');
|
||||
|
||||
var webroot = "./wwwroot/";
|
||||
|
||||
@ -31,8 +31,6 @@ gulp.task("clean:css", function(cb) {
|
||||
|
||||
gulp.task("clean", ["clean:js", "clean:css"]);
|
||||
|
||||
|
||||
|
||||
gulp.task('watch', shell.task(['ASPNET_ENV=Development dnx-watch web --configuration=Debug']));
|
||||
gulp.task('watchlua', shell.task(['ASPNET_ENV=lua dnx-watch luatest --configuration=Debug']));
|
||||
gulp.task('watchpre', shell.task(['ASPNET_ENV=yavscpre dnx-watch web --configuration=Debug']));
|
||||
@ -56,7 +54,22 @@ gulp.task("min", ["min:js", "min:css"]);
|
||||
gulp.task('build', shell.task(['dnu build --configuration=Debug']));
|
||||
gulp.task('run', shell.task(['ASPNET_ENV=Development dnx web --configuration=Debug']));
|
||||
gulp.task('buildrelease', shell.task(['dnu build --configuration=Release']));
|
||||
gulp.task('publish', shell.task(['dnu publish --configuration=Release']));
|
||||
gulp.task('postpublish', shell.task(['contrib/rsync-to-pre.sh']));
|
||||
|
||||
|
||||
|
||||
gulp.task('cleanoutput', () => {
|
||||
gulp.src('bin/output', { read: false }).pipe(clean())
|
||||
});
|
||||
gulp.task('dnupublish', ['cleanoutput'], () => {
|
||||
shell.task(['dnu publish --configuration=Release',
|
||||
'git log -1 --pretty=format:%h > bin/output/wwwroot/version'
|
||||
]).apply();
|
||||
});
|
||||
gulp.task('pushinpre', ['dnupublish'], () => {
|
||||
shell.task('contrib/rsync-to-pre.sh').apply();
|
||||
})
|
||||
gulp.task('pushinprod', ['dnupublish'], () => {
|
||||
shell.task('contrib/rsync-to-prod.sh').apply();
|
||||
})
|
||||
|
||||
gulp.task("default", ["watch"]);
|
@ -4,6 +4,7 @@
|
||||
"devDependencies": {
|
||||
"grunt": "^1.0.1",
|
||||
"gulp": "^3.9.0",
|
||||
"gulp-clean": "^0.3.2",
|
||||
"gulp-concat": "2.5.2",
|
||||
"gulp-cssmin": "^0.1.7",
|
||||
"gulp-dnx-tasks": "^1.0.0-beta7",
|
||||
|
@ -161,7 +161,7 @@
|
||||
"prerestore": "echo before restoring packages",
|
||||
"postrestore": "echo after restoring packages",
|
||||
"prepublish": "gulp min",
|
||||
"postpublish": "echo \"Use contrib/rsync-to-pre.sh # to push in prod.\""
|
||||
"postpublish": "echo after publish"
|
||||
},
|
||||
"embed": "Views/**/*.cshtml"
|
||||
}
|
Reference in New Issue
Block a user