diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d910d2224..3add3c6c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,10 +62,6 @@ jobs: key: ${{ runner.os }}-crystal - name: Install shards run: shards install - - name: Install Lucky CLI - run: | - crystal build lib/lucky_cli/src/lucky.cr --no-debug --release - cp lucky /usr/local/bin - name: Run integration test run: ./script/integration_test env: diff --git a/script/integration_test b/script/integration_test index a41c3883f..c42c01a15 100755 --- a/script/integration_test +++ b/script/integration_test @@ -5,6 +5,8 @@ set -e printf "\nRunning tasks\n\n" +alias lucky="crystal tasks.cr" + lucky db.drop lucky db.create lucky db.migrate @@ -23,4 +25,4 @@ then lucky db.reset lucky db.drop lucky db.setup -fi \ No newline at end of file +fi diff --git a/shard.yml b/shard.yml index 1ca84128c..b26bfbf63 100644 --- a/shard.yml +++ b/shard.yml @@ -13,8 +13,8 @@ authors: - Paul Smith dependencies: - lucky_cli: - github: luckyframework/lucky_cli + lucky_task: + github: luckyframework/lucky_task branch: master pg: github: will/crystal-pg diff --git a/src/avram.cr b/src/avram.cr index bd692174c..6ccc9e46c 100644 --- a/src/avram.cr +++ b/src/avram.cr @@ -1,5 +1,4 @@ require "dexter" -require "lucky_cli" require "wordsmith" require "habitat" require "pulsar" diff --git a/src/avram/migrator/runner.cr b/src/avram/migrator/runner.cr index 82baa3639..27da538ca 100644 --- a/src/avram/migrator/runner.cr +++ b/src/avram/migrator/runner.cr @@ -1,11 +1,12 @@ require "db" require "pg" require "colorize" +require "lucky_task" class Avram::Migrator::Runner MIGRATIONS_TABLE_NAME = "migrations" - extend LuckyCli::TextHelpers + extend LuckyTask::TextHelpers @@migrations = [] of Avram::Migrator::Migration::V1.class diff --git a/src/avram/tasks/db/base_task.cr b/src/avram/tasks/db/base_task.cr index 4f80e0cda..6e9fb77d4 100644 --- a/src/avram/tasks/db/base_task.cr +++ b/src/avram/tasks/db/base_task.cr @@ -1,4 +1,4 @@ -abstract class BaseTask < LuckyCli::Task +abstract class BaseTask < LuckyTask::Task abstract def run_task def call diff --git a/src/avram/tasks/db/console.cr b/src/avram/tasks/db/console.cr index f902e2941..a48a49a22 100644 --- a/src/avram/tasks/db/console.cr +++ b/src/avram/tasks/db/console.cr @@ -1,4 +1,4 @@ -class Db::Console < LuckyCli::Task +class Db::Console < LuckyTask::Task summary "Access PostgreSQL console" def help_message diff --git a/src/avram/tasks/gen/migration.cr b/src/avram/tasks/gen/migration.cr index 078c6c44d..e33896032 100644 --- a/src/avram/tasks/gen/migration.cr +++ b/src/avram/tasks/gen/migration.cr @@ -3,7 +3,7 @@ require "ecr" require "file_utils" class Avram::Migrator::MigrationGenerator - include LuckyCli::TextHelpers + include LuckyTask::TextHelpers getter :name @_version : String? @@ -105,7 +105,7 @@ class Avram::Migrator::MigrationGenerator end end -class Gen::Migration < LuckyCli::Task +class Gen::Migration < LuckyTask::Task summary "Generate a new migration" Habitat.create do diff --git a/tasks.cr b/tasks.cr index aafb68e43..0dd6fd6ea 100644 --- a/tasks.cr +++ b/tasks.cr @@ -1,7 +1,7 @@ -require "lucky_cli" +require "lucky_task" require "./src/avram" require "./config/*" require "./db/migrations/*" Habitat.raise_if_missing_settings! -LuckyCli::Runner.run +LuckyTask::Runner.run