mirror of
https://github.com/zoriya/flood.git
synced 2025-12-06 07:16:18 +00:00
Revert "Revert "single executable support""
This reverts commit 970b2dd274.
This commit is contained in:
@@ -52,6 +52,7 @@ config.js
|
|||||||
|
|
||||||
# Distribution files
|
# Distribution files
|
||||||
dist/
|
dist/
|
||||||
|
dist-pkg/
|
||||||
|
|
||||||
# Runtime files
|
# Runtime files
|
||||||
run/
|
run/
|
||||||
|
|||||||
45
.github/workflows/publish-rolling.yml
vendored
45
.github/workflows/publish-rolling.yml
vendored
@@ -38,3 +38,48 @@ jobs:
|
|||||||
- run: npm publish --access public
|
- run: npm publish --access public
|
||||||
env:
|
env:
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
|
pkg:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node: [15]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Use Node.js ${{ matrix.node }}
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node }}
|
||||||
|
registry-url: 'https://registry.npmjs.org'
|
||||||
|
|
||||||
|
- run: npm ci --no-optional
|
||||||
|
- run: sudo npm install -g pkg
|
||||||
|
|
||||||
|
- name: Tag rolling release
|
||||||
|
run: |
|
||||||
|
npm version --no-git-tag-version 0.0.0-master.`git rev-parse --short HEAD`
|
||||||
|
|
||||||
|
- name: Build executables
|
||||||
|
run: |
|
||||||
|
npm run build-pkg
|
||||||
|
|
||||||
|
- name: 'Upload executable: Linux'
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: flood-linux
|
||||||
|
path: dist-pkg/flood-linux
|
||||||
|
|
||||||
|
- name: 'Upload executable: MacOS'
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: flood-macos
|
||||||
|
path: dist-pkg/flood-macos
|
||||||
|
|
||||||
|
- name: 'Upload executable: Windows'
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: flood-win
|
||||||
|
path: dist-pkg/flood-win.exe
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -49,6 +49,7 @@ config.js
|
|||||||
|
|
||||||
# Distribution files
|
# Distribution files
|
||||||
dist/
|
dist/
|
||||||
|
dist-pkg/
|
||||||
|
|
||||||
# Runtime files
|
# Runtime files
|
||||||
run/
|
run/
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
# Distribution files
|
# Distribution files
|
||||||
dist/
|
dist/
|
||||||
|
dist-pkg/
|
||||||
|
|
||||||
# Coverage reports
|
# Coverage reports
|
||||||
coverage/
|
coverage/
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ Install [Node.js runtime](https://nodejs.org/). Flood tracks `Current` and provi
|
|||||||
- Debian, Ubuntu and RHEL-based distributions users can install latest `nodejs` from [NodeSource](https://github.com/nodesource/distributions) software repository.
|
- Debian, Ubuntu and RHEL-based distributions users can install latest `nodejs` from [NodeSource](https://github.com/nodesource/distributions) software repository.
|
||||||
- Windows and MacOS users may use installer.
|
- Windows and MacOS users may use installer.
|
||||||
|
|
||||||
|
**EXPERIMENTAL**: You can download a single-executable rolling build of Flood from [Github Actions](https://github.com/jesec/flood/actions?query=workflow%3A%22Publish+rolling+build%22). It bundles `Node.js` and supports `Linux`, `MacOS` and `Windows`.
|
||||||
|
|
||||||
### Installation
|
### Installation
|
||||||
|
|
||||||
`sudo npm i -g flood` or `npx flood`
|
`sudo npm i -g flood` or `npx flood`
|
||||||
|
|||||||
13
package.json
13
package.json
@@ -27,11 +27,24 @@
|
|||||||
"bin": {
|
"bin": {
|
||||||
"flood": "dist/index.js"
|
"flood": "dist/index.js"
|
||||||
},
|
},
|
||||||
|
"pkg": {
|
||||||
|
"assets": [
|
||||||
|
"dist/assets/**/*",
|
||||||
|
"dist/geoip-country.dat",
|
||||||
|
"dist/geoip-country6.dat"
|
||||||
|
],
|
||||||
|
"targets": [
|
||||||
|
"node14-linux-x64",
|
||||||
|
"node14-macos-x64",
|
||||||
|
"node14-win-x64"
|
||||||
|
]
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "npm run build-assets && npm run build-ts",
|
"build": "npm run build-assets && npm run build-ts",
|
||||||
"build-assets": "node client/scripts/build.js",
|
"build-assets": "node client/scripts/build.js",
|
||||||
"build-ts": "ncc build server/bin/start.ts -m -t -e geoip-country",
|
"build-ts": "ncc build server/bin/start.ts -m -t -e geoip-country",
|
||||||
"build-i18n": "formatjs compile --ast --format simple client/src/javascript/i18n/strings.json --out-file client/src/javascript/i18n/strings.compiled.json && formatjs compile-folder --ast --format simple client/src/javascript/i18n/translations client/src/javascript/i18n/compiled",
|
"build-i18n": "formatjs compile --ast --format simple client/src/javascript/i18n/strings.json --out-file client/src/javascript/i18n/strings.compiled.json && formatjs compile-folder --ast --format simple client/src/javascript/i18n/translations client/src/javascript/i18n/compiled",
|
||||||
|
"build-pkg": "rm -rf dist && npm run build && pkg . --out-path dist-pkg",
|
||||||
"format-source": "prettier -w .",
|
"format-source": "prettier -w .",
|
||||||
"check-compiled-i18n": "npm run build-i18n && npm run format-source && git diff --quiet client/src/javascript/i18n/compiled",
|
"check-compiled-i18n": "npm run build-i18n && npm run format-source && git diff --quiet client/src/javascript/i18n/compiled",
|
||||||
"check-source-formatting": "prettier -c .",
|
"check-source-formatting": "prettier -c .",
|
||||||
|
|||||||
Reference in New Issue
Block a user