bundai223 / dotfiles

dotfiles. use mitamae.
1 stars 1 forks source link

git hooksをperlで書きなおす #1

Closed bundai223 closed 5 years ago

bundai223 commented 5 years ago

rubyで書かれているスクリプトをruby versionに依存しないためにperlでかきなおす。

$ grep -i ruby config/git/templates/hooks/*
config/git/templates/hooks/post-checkout.set_branchdesc_from_issuename:#!/usr/bin/env ruby
config/git/templates/hooks/post-checkout.set_branchdesc_from_issuename:# vim: set ft=ruby:modeline
config/git/templates/hooks/prepare-commit-msg.set_issue_no:#!/usr/bin/env ruby

対象は2ファイル

bundai223 commented 5 years ago

いつのまにかクリアしてたのでクローズ

 …/g/b/dotfiles: $ grep -i ruby config/git/templates/hooks/*
 …/g/b/dotfiles: $ grep '!' config/git/templates/hooks/*
config/git/templates/hooks/commit-msg:#!/bin/bash
config/git/templates/hooks/commit-msg.git-secrets:#!/usr/bin/env bash
config/git/templates/hooks/hook-chain:#!/bin/bash
config/git/templates/hooks/post-checkout:#!/bin/bash
config/git/templates/hooks/post-checkout.set_branchdesc_from_issuename:#!/usr/bin/env perl
config/git/templates/hooks/post-checkout.set_branchdesc_from_issuename:  my $json = get($uri) or die "Couldn't get {$uri}!";
config/git/templates/hooks/post-checkout.set_user_info:#!/bin/sh
config/git/templates/hooks/pre-commit:#!/bin/bash
config/git/templates/hooks/pre-commit.git-secrets:#!/usr/bin/env bash
config/git/templates/hooks/prepare-commit-msg:#!/bin/bash
config/git/templates/hooks/prepare-commit-msg.git-secrets:#!/usr/bin/env bash
config/git/templates/hooks/prepare-commit-msg.set_issue_no:#!/usr/bin/env perl
config/git/templates/hooks/prepare-commit-msg.set_issue_no:  if (!is_merge_commit($commit_message) && !is_include_refs($commit_message)) {