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

Commit

Permalink
Add support for releasing as a Debian package
Browse files Browse the repository at this point in the history
  • Loading branch information
mjs committed Aug 20, 2018
1 parent 81dfdff commit 6b4ae4a
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 7 deletions.
14 changes: 8 additions & 6 deletions README.md
Expand Up @@ -24,14 +24,16 @@ For detailed explanation on how things work, consult the [docs for vue-loader](h
Please follow the Vue style guide for all development:
https://vuejs.org/v2/style-guide/#ad

# Production
# Production Releases

Create the distribution file
``` bash
npm run build
```
* Ensure all changes have been merged and are pulled into the local copy.
* Update the version number and tag the new version with: `npm version <new-version>`
* Push the tag to Github: `git push origin <version>`
* Build the deb package: `nfpm pkg -t cacophony-web-vuex_<version>.deb`
* Upload the resulting package to the [Github Releases](https://github.com/TheCacophonyProject/cacophony-web-vuex/releases) for cacophony-web-vuex

The index.html file in the root of the project should be served via a web server, an express example might look as follows:
The index.html file in the root of the distribution should be served
via a web server. An express example might look as follows:

```javascript
const express = require('express');
Expand Down
13 changes: 13 additions & 0 deletions nfpm.yaml
@@ -0,0 +1,13 @@
name: "cacophony-web-vuex"
arch: "amd64"
platform: "linux"
version: "0.0.0"
maintainer: "Cacophony Developers <dev@cacophony.org.nz>"
description: |
Web interface for the Cacophony Project API
vendor: "The Cacophony Project"
homepage: https://github.com/TheCacophonyProject
license: "GPLv3"
files:
./index.html: "/srv/cacophony/cacophony-web-vuex/"
./dist/*: "/srv/cacophony/cacophony-web-vuex/dist/"
4 changes: 3 additions & 1 deletion package.json
Expand Up @@ -11,7 +11,9 @@
"test": "cross-env NODE_ENV=test jest",
"test:watch": "cross-env NODE_ENV=test npm run test -- --watch",
"lint": "eslint ./src --ext .js,.vue",
"lint-fix": "eslint ./src --fix --ext .js,.vue"
"lint-fix": "eslint ./src --fix --ext .js,.vue",
"preversion": "npm test",
"version": "./update-nfpm-version"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.1",
Expand Down
8 changes: 8 additions & 0 deletions update-nfpm-version
@@ -0,0 +1,8 @@
#!/bin/sh

# This script writes the version number in $npm_package_version into
# the correct place in nfpm.yaml. It is called by a script target in
# packages.json.

perl -pi -e "s/^version:.+/version: \"$npm_package_version\"/" nfpm.yaml
git add nfpm.yaml

0 comments on commit 6b4ae4a

Please sign in to comment.