Skip to content

Commit 35726fc

Browse files
committed
Build stuff
1 parent 94fd15b commit 35726fc

File tree

5 files changed

+83
-0
lines changed

5 files changed

+83
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
src/.vs/
22
src/Skybrud.Social.TwentyThree/bin/
33
src/Skybrud.Social.TwentyThree/obj/
4+
node_modules/

Gruntfile.js

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
module.exports = function(grunt) {
2+
3+
var path = require('path');
4+
5+
// Load the package JSON file
6+
var pkg = grunt.file.readJSON('package.json');
7+
8+
// Get the root path of the project
9+
var projectRoot = 'src/' + pkg.name + '/';
10+
11+
// Load the .csproj file (just as clear text)
12+
var csproj = grunt.file.read(projectRoot + pkg.name + '.csproj');
13+
14+
var version = csproj.match(/<Version>(.+?)<\/Version>/);
15+
16+
if (!version) {
17+
console.error('Unable to determine version from .csproj');
18+
return;
19+
}
20+
21+
version = version[1];
22+
23+
grunt.initConfig({
24+
pkg: pkg,
25+
zip: {
26+
release: {
27+
cwd: 'src/' + pkg.name + '/bin/Release/',
28+
src: [
29+
'src/' + pkg.name + '/bin/Release/**/*.dll',
30+
'src/' + pkg.name + '/bin/Release/**/*.xml',
31+
'src/' + pkg.name + '/bin/Release/**/*.html',
32+
'src/' + pkg.name + '/bin/Release/**/*.txt',
33+
'src/' + pkg.name + '/bin/Release/**/*.json'
34+
],
35+
dest: 'releases/github/' + pkg.name + '.v' + version + '.zip'
36+
}
37+
}
38+
});
39+
40+
grunt.loadNpmTasks('grunt-zip');
41+
42+
grunt.registerTask('dev', ['zip']);
43+
44+
grunt.registerTask('default', ['dev']);
45+
46+
};

LICENSE.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2018 [Anders Bjerner](https://twitter.com/abjerner)
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of
4+
this software and associated documentation files (the "Software"), to deal in
5+
the Software without restriction, including without limitation the rights to
6+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7+
of the Software, and to permit persons to whom the Software is furnished to do
8+
so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19+
IN THE SOFTWARE.

package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "Skybrud.Social.TwentyThree",
3+
"url": "https://github.com/abjerner/Skybrud.Social.TwentyThree",
4+
"license": {
5+
"name": "MIT",
6+
"url": "https://github.com/abjerner/Skybrud.Social.TwentyThree/blob/master/LICENSE.md"
7+
},
8+
"devDependencies": {
9+
"grunt": "~0.4.5",
10+
"grunt-zip": "~0.17.1"
11+
}
12+
}

release.bat

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@echo off
2+
cd src/Skybrud.Social.TwentyThree
3+
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\msbuild.exe" /t:pack /p:Configuration=Release /p:PackageOutputPath=../../releases/nuget /p:RunBuildTargets=false
4+
cd ../../
5+
grunt

0 commit comments

Comments
 (0)