diff --git a/doc/GraalVM.md b/doc/GraalVM.md index 0cb085f..621a66e 100644 --- a/doc/GraalVM.md +++ b/doc/GraalVM.md @@ -21,10 +21,12 @@ sudo apt-get install build-essential libz-dev zlib1g-dev # build cd ~/repo/dda/k8s-mastodon-bot -mkdir -p target/graalvm lein uberjar +mkdir -p target/graalvm lein native # execute -./target/graalvm/k8s-mastodon-bot src/main/resources/config.edn src/main/resources/auth.edn +./target/graalvm/k8s-mastodon-bot -h +./target/graalvm/k8s-mastodon-bot src/test/resources/valid-config.edn src/test/resources/valid-auth.edn +./target/graalvm/k8s-mastodon-bot src/test/resources/invalid-config.edn src/test/resources/invalid-auth.edn ``` \ No newline at end of file diff --git a/resource-config.json b/graalvm-resource-config.json similarity index 74% rename from resource-config.json rename to graalvm-resource-config.json index b616997..c387bbe 100644 --- a/resource-config.json +++ b/graalvm-resource-config.json @@ -1,7 +1,6 @@ { "resources": { "includes": [ - {"pattern": ".*.edn"}, {"pattern": ".*.yaml"} ] } diff --git a/project.clj b/project.clj index adf34f8..331ef00 100644 --- a/project.clj +++ b/project.clj @@ -39,6 +39,6 @@ "--report-unsupported-elements-at-runtime" "--initialize-at-build-time" "-jar" "target/uberjar/k8s-mastodon-bot-standalone.jar" - "-H:ResourceConfigurationFiles=resource-config.json" + "-H:ResourceConfigurationFiles=graalvm-resource-config.json" "-H:Log=registerResource" "-H:Name=target/graalvm/${:name}"]}) diff --git a/src/main/resources/auth.edn b/src/main/resources/auth.edn deleted file mode 100644 index 894ccfd..0000000 --- a/src/main/resources/auth.edn +++ /dev/null @@ -1,14 +0,0 @@ -{:auth {;; add Twitter config to mirror Twitter accounts - :twitter {:consumer_key "XXXX" - :consumer_secret "XXXX" - :access_token_key "XXXX" - :access_token_secret "XXXX"} - :mastodon {:access_token "XXXX" - ;; account number you see when you log in and go to your profile - ;; e.g: https://mastodon.social/web/accounts/294795 - :account-id "XXXX" - :api_url "https://botsin.space/api/v1/"} - :tumblr {:consumer_key "XXXX" - :consumer_secret "XXXX" - :token "XXXX" - :token_secret "XXXX"}}} \ No newline at end of file diff --git a/src/main/resources/config.edn b/src/main/resources/config.edn deleted file mode 100644 index e4d084c..0000000 --- a/src/main/resources/config.edn +++ /dev/null @@ -1,26 +0,0 @@ -{:transform [{:source {:source-type :twitter - ;; optional, defaults to false - :include-replies? false - ;; optional, defaults to false - :include-rts? false - ;; Replace Twitter links by Nitter - :nitter-urls? false - ;; accounts you wish to mirror - :accounts ["arstechnica" "WIRED"]} - :target {:target-type :mastodon - ;; optional flag specifying wether the name of the account - ;; will be appended in the post, defaults to false - :append-screen-name? false - ;; optional visibility flag: direct, private, unlisted, public - ;; defaults to public - :visibility "unlisted" - ;; optional boolean to mark content as sensitive. Defaults to true. - :sensitive? true - ;; optional boolean defaults to false - ;; only sources containing media will be posted when set to true - :media-only? true - ;; optional limit for the post length. Defaults to 300. - :max-post-length 300 - ;; optional signature for posts. Defaults to "not present". - :signature "#newsbot"}}] - :auth{}}