Sha256: c03fde7afc0465c27f2661e5b297be8984660cd98c74890c7ec6b24a588a9846
Contents?: true
Size: 1.02 KB
Versions: 6
Compression:
Stored size: 1.02 KB
Contents
# frozen_string_literal: true require 'capistrano/i18n' require 'dkdeploy/i18n' require 'dkdeploy/constants' include Capistrano::DSL namespace :project_version do desc 'Update Version file on server' task :update, :version_file_path do |_, args| version_file_path = ask_variable(args, :version_file_path, 'questions.version_file_path') remote_version_file = File.join release_path, version_file_path, 'Version' local_version_file = 'Version' unless File.exist? local_version_file # check if the local version file exists run_locally do error I18n.t('file.not_exists', file: local_version_file, scope: :dkdeploy) exit 1 end end on release_roles :app do info I18n.t('tasks.project_version.update.update', scope: :dkdeploy) # remove the to be replaced remote version file execute :rm, '-f', remote_version_file if test " [ -f #{remote_version_file} ] " # upload the current version file upload! local_version_file, remote_version_file end end end
Version data entries
6 entries across 6 versions & 1 rubygems