Skip to content

keeweb/grunt-contrib-deb

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grunt-contrib-deb

grunt task for creating .deb packages for linux. Can be run from Windows too.

Getting started

This plugin requires Grunt >=0.4.0

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-contrib-deb --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-contrib-deb');

Deb task

Run this task with the grunt deb command.

Task targets, files and options may be specified according to the grunt Configuring tasks guide.

Usage

grunt.initConfig({
  deb: {
    mytask: {
      options: {
        package: grunt.file.readJSON('./package.json'), // needed for extracting project info
        info: {
          rev: '512', // optional revision number
          arch: 'amd64', // optional architecture type
          targetDir: './dist', // optional folder where to build the .deb package
          tmpPath: './tmp', // optional temporary files path
          scripts: {
            preinst: './deb/scripts/preinst', // optional pre install script
            postinst: './deb/scripts/postinst', // optional post install script
            prerem: './deb/scripts/prerem', // optional pre remove script
            postrem: './deb/scripts/postrem', // optional post remove script
          }
        }
      },
      files: [{
        src: ['src/**', '!tests/**'],
        dest: '/srv/myproject',
        cwd: './server',
        expand: true
      }, { // add configuration files (init scripts, logrotate, systemd, etc...)
        src: ['**'],
        dest: '/etc',
        cwd: './config',
        expand: true
      }]
    }
  }
});

grunt.loadNpmTasks('deb');

// ...

grunt.registerTask('deploy', ['deb']);

License

MIT

About

grunt task for creating .deb packages

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%