tmori3y2のブログ

主にWindowsのプログラムなど

Gist貼り付けで古いリビジョンを貼り付けてみた ~ Gist始めました

staff.hatenablog.com

Gistを始めました・・・

取りあえず前回の記事のMSBuild Targetの一部を張り付けてみることにした。

tmori3y2.hatenablog.com

MSBuildTasks.ImportTasks.props

[https://gist.github.com/b5fc4c37812ced105ca1:embed#Automatic imported MSBuild project property sheet  ...]

[Automatic imported MSBuild project property sheet  ...](https://gist.github.com/b5fc4c37812ced105ca1)

見た目はこちら・・・

Automatic imported MSBuild project property sheet ...

個人的には、embedの後ろのタイトルは要らないと思うし、リンクがタイトル代わりなので、上下逆だと思う・・・

ちなみに内容が前の記事と変わっているのは、前の記事を書く前に、MSBuild TargetをImportするTargetと、MSBuild Targetやコンテンツ、アセンブリのNuGetPackageを作成するMSBuild Targetとで、

「卵が先か?鶏が先か?」

的なことを迷っていたので、ちょっといじってる・・・

(ホントは、今回の記事のネタ作りなんだけどね)

ちなみに、上記の貼り付けた奴は、Gistを更新すると、今後も勝手に新しくなっていきます・・・

今の結論は、

「OnBuildみたいに、標準で付けてPackオフ機能を付ければ良い」

ということなので、改良版を乞うご期待。

取りあえず

「過去記事があるので、昔のリビジョンはどうやって表示するかな?」

と試してみたら、リビジョンのURLをそのまま書けばいけそう。

[Automatic imported MSBuild project property sheet file which imports another one installed at the same time by NuGet](https://gist.github.com/b5fc4c37812ced105ca1/bd8193a9d419c6fc976e12c9f6cedbec866566f8)

[https://gist.github.com/b5fc4c37812ced105ca1/bd8193a9d419c6fc976e12c9f6cedbec866566f8:embed]

Automatic imported MSBuild project property sheet file which imports another one installed at the same time by NuGet

「できた!!」

Gistのスクリプト貼り付けでも同じ対応で可能。

<script src="https://gist.github.com/tmori3y2/b5fc4c37812ced105ca1.js"></script>

<script src="https://gist.github.com/tmori3y2/b5fc4c37812ced105ca1/bd8193a9d419c6fc976e12c9f6cedbec866566f8.js"></script>

とすれば良い。

はてなの妙に行間が間延びしたコードブロックより見やすくて良いね!!」

「最初のリビジョンからGUID付きのURLもあるから、そっちを使えばあとからリンク編集も不要だね!!」