diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..8f18873 --- /dev/null +++ b/.drone.yml @@ -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 diff --git a/.gitignore b/.gitignore index b0b6a2a..e222c89 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ *.exe -BNC/* \ No newline at end of file +data/BNC/* \ No newline at end of file diff --git a/src/process.nim b/src/process.nim index ec11254..a638cfd 100644 --- a/src/process.nim +++ b/src/process.nim @@ -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