add drone CI config
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Joseph Montanaro 2021-07-27 21:36:34 -07:00
parent 29e59ab845
commit 203cc55350
3 changed files with 40 additions and 5 deletions

35
.drone.yml Normal file
View File

@ -0,0 +1,35 @@
kind: pipeline
type: docker
name: main
trigger:
branch:
- master
event:
- push
- tag
steps:
- name: build-windows
image: nimlang/nim
commands:
- apt update
- apt install -y mingw-w64
- nimble build -y -d:mingw
- name: build-linux
image: nimlang/nim
commnds:
- nimble build -y -o:passphrase_linux
- name: release
image: plugins/gitea-release
when:
event: tag
settings:
base_url: 'https://git.jfmonty2.com/jfmonty2/passphrase.git'
files:
- passphrase_linux
- passphrase.exe
api_key:
from_secret: gitea_token

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
*.exe
BNC/*
data/BNC/*

View File

@ -28,8 +28,8 @@ proc save(wordCounts: CountTable; dictName, countName: string) =
type Config = object
srcPath: string,
dstPath: string,
srcPath: string
dstPath: string
proc parseInput(): Config =
@ -41,8 +41,8 @@ proc parseInput(): Config =
if paramCount() > 1:
result.dstPath = paramStr(2)
if not dirExists(basePath):
quit("Could not locate datafiles: directory " & basePath & " does not exist.")
if not dirExists(result.srcPath):
quit("Could not locate datafiles: directory " & result.srcPath & " does not exist.")
var