Skip to content

Commit

Permalink
0.10.0.1: Fix release and release testing scripts
Browse files Browse the repository at this point in the history
Fixes #88 by getting the release scripts to build a dummy
test package against the freshly minted Hackage-release
release tar balls using a recent lts-haskelli release.
  • Loading branch information
cdornan committed Mar 26, 2017
1 parent a47650f commit 4454e44
Show file tree
Hide file tree
Showing 33 changed files with 295 additions and 94 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -4,7 +4,7 @@
.ghci
.hub
.ghci
stack.yaml
/stack.yaml
README.markdown
tmp

Expand Down
5 changes: 3 additions & 2 deletions README.md
Expand Up @@ -48,8 +48,9 @@ two packages:
- [X] 2017-03-13 v0.6.0.1 [Fix .travis.yml release-stack script](https://github.com/iconnect/regex/issues/67)
- [X] 2017-03-15 v0.7.0.0 [Better organization of API](https://github.com/iconnect/regex/milestone/8)
- [X] 2017-03-16 v0.8.0.0 [Tidy up the API](https://github.com/iconnect/regex/milestone/10)
- [X] 2017-03-18 v0.9.0.0 [Finish tidying up the API, Add type-safe replacement templates and exploit TemplateHaskellQuotes](https://github.com/iconnect/regex/milestone/9)
- [X] 2017-03-18 v0.10.0.0 [Tweak TypeSafe SearchReplace templates](https://github.com/iconnect/regex/milestone/11)
- [X] 2017-03-24 v0.9.0.0 [Finish tidying up the API, Add type-safe replacement templates and exploit TemplateHaskellQuotes](https://github.com/iconnect/regex/milestone/9)
- [X] 2017-03-25 v0.10.0.0 [Tweak TypeSafe SearchReplace templates](https://github.com/iconnect/regex/milestone/11)
- [X] 2017-03-26 v0.10.0.1 [Fix release](https://github.com/iconnect/regex/issues/88)
- [ ] 2017-03-31 v1.0.0.0 [First stable release](https://github.com/iconnect/regex/milestone/3)
- [ ] 2017-08-31 v2.0.0.0 [Fast text replacement with benchmarks](https://github.com/iconnect/regex/milestone/4)

Expand Down
16 changes: 16 additions & 0 deletions Text/RE/Internal/Examples.hs
@@ -0,0 +1,16 @@
module Text.RE.Internal.Examples
(
-- * regex-examples dummy library
-- $announce
greetings
) where

greetings :: IO ()
greetings = putStr $ unlines
[ "Hello! This is a dummy function in the dummy library of the"
, "regex-examples package."
]

-- $announce
--
-- This is a dummy library to accompany the regex-examples programs.
3 changes: 3 additions & 0 deletions changelog
@@ -1,5 +1,8 @@
-*-change-log-*-

0.10.0.1 Chris Dornan <chris.dornan@irisconnect.co.uk> 2017-03-26
* Fix sub-package cabal files (#88)

0.10.0.0 Chris Dornan <chris.dornan@irisconnect.co.uk> 2017-03-25
* Tweak Type-Safe SearchReplace templates (#86)
* Add escape methods to IsRegex (#87)
Expand Down
2 changes: 1 addition & 1 deletion docs/badges/build-status.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/badges/hackage.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/badges/unix-build.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/changelog.html
Expand Up @@ -126,6 +126,9 @@ <h2 id="changelog">
</h2>
<div class="sourceCode"><pre class="sourceCode changelog"><code class="sourceCode changelog">-*-change-log-*-

0.10.0.1 Chris Dornan &lt;chris.dornan@irisconnect.co.uk&gt; 2017-03-26
<span class="dv">*</span> Fix sub-package cabal files (#88)

0.10.0.0 Chris Dornan &lt;chris.dornan@irisconnect.co.uk&gt; 2017-03-25
<span class="dv">*</span> Tweak Type-Safe SearchReplace templates (#86)
<span class="dv">*</span> Add escape methods to IsRegex (#87)
Expand Down
7 changes: 5 additions & 2 deletions docs/index.html
Expand Up @@ -166,10 +166,13 @@ <h2 id="roadmap">
<input type='checkbox' class='task-list-item-checkbox' checked='' disabled=''/>2017-03-16 v0.8.0.0 <a href="https://github.com/iconnect/regex/milestone/10">Tidy up the API</a>
</li>
<li class="task-list-item">
<input type='checkbox' class='task-list-item-checkbox' checked='' disabled=''/>2017-03-18 v0.9.0.0 <a href="https://github.com/iconnect/regex/milestone/9">Finish tidying up the API, Add type-safe replacement templates and exploit TemplateHaskellQuotes</a>
<input type='checkbox' class='task-list-item-checkbox' checked='' disabled=''/>2017-03-24 v0.9.0.0 <a href="https://github.com/iconnect/regex/milestone/9">Finish tidying up the API, Add type-safe replacement templates and exploit TemplateHaskellQuotes</a>
</li>
<li class="task-list-item">
<input type='checkbox' class='task-list-item-checkbox' checked='' disabled=''/>2017-03-18 v0.10.0.0 <a href="https://github.com/iconnect/regex/milestone/11">Tweak TypeSafe SearchReplace templates</a>
<input type='checkbox' class='task-list-item-checkbox' checked='' disabled=''/>2017-03-25 v0.10.0.0 <a href="https://github.com/iconnect/regex/milestone/11">Tweak TypeSafe SearchReplace templates</a>
</li>
<li class="task-list-item">
<input type='checkbox' class='task-list-item-checkbox' checked='' disabled=''/>2017-03-26 v0.10.0.1 <a href="https://github.com/iconnect/regex/issues/88">Fix release</a>
</li>
<li class="task-list-item">
<input type='checkbox' class='task-list-item-checkbox' disabled=''/>2017-03-31 v1.0.0.0 <a href="https://github.com/iconnect/regex/milestone/3">First stable release</a>
Expand Down
24 changes: 22 additions & 2 deletions docs/re-gen-cabals.html
Expand Up @@ -171,7 +171,7 @@ <h1 id="regex-cabal-gen">Regex Cabal Gen</h1>
, <span class="dt">LineEdit</span> [re<span class="fu">|^%</span><span class="dt">Wwarn</span><span class="fu">$|</span>] <span class="fu">$</span> w_warn_gen ctx
, <span class="dt">LineEdit</span> [re<span class="fu">|^%</span>filter<span class="fu">-</span>regex<span class="fu">-</span>with<span class="fu">-</span>pcre<span class="fu">$|</span>] <span class="fu">$</span> w_filter_pcre ctx
, <span class="dt">LineEdit</span> [re<span class="fu">|^%-</span> <span class="fu">+$</span>{pkg}(<span class="fu">@</span>{<span class="fu">%</span>id<span class="fu">-</span>}) <span class="fu">+$</span>{cond}(<span class="fu">.*</span>)<span class="fu">$|</span>] <span class="fu">$</span> cond_gen ctx
, <span class="dt">LineEdit</span> [re<span class="fu">|^%</span>build<span class="fu">-</span>depends<span class="fu">-$</span>{lb}(lib<span class="fu">|</span>prog) <span class="fu">+$</span>{list}(<span class="fu">@</span>{<span class="fu">%</span>id<span class="fu">-</span>}( <span class="fu">+@</span>{<span class="fu">%</span>id<span class="fu">-</span>})<span class="fu">+</span>)<span class="fu">$|</span>]
, <span class="dt">LineEdit</span> [re<span class="fu">|^%</span>build<span class="fu">-</span>depends<span class="fu">-$</span>{lb}(lib<span class="fu">|</span>prog) <span class="fu">+$</span>{list}(<span class="fu">@</span>{<span class="fu">%</span>id<span class="fu">-</span>}( <span class="fu">+@</span>{<span class="fu">%</span>id<span class="fu">-</span>})<span class="fu">*</span>)<span class="fu">$|</span>]
<span class="fu">$</span> build_depends_gen ctx
, <span class="dt">LineEdit</span> [re<span class="fu">|^%</span>test <span class="fu">+$</span>{i}(<span class="fu">@</span>{<span class="fu">%</span>id<span class="fu">-</span>})<span class="fu">$|</span>] <span class="fu">$</span> test_exe_gen <span class="dt">True</span> <span class="dt">False</span> ctx
, <span class="dt">LineEdit</span> [re<span class="fu">|^%</span>exe <span class="fu">+$</span>{i}(<span class="fu">@</span>{<span class="fu">%</span>id<span class="fu">-</span>})<span class="fu">$|</span>] <span class="fu">$</span> test_exe_gen <span class="dt">False</span> <span class="dt">True</span> ctx
Expand Down Expand Up @@ -350,6 +350,7 @@ <h1 id="regex-cabal-gen">Regex Cabal Gen</h1>
sdist&#39; <span class="st">&quot;regex-examples&quot;</span> <span class="st">&quot;lib/README-regex-examples.md&quot;</span>
establish <span class="st">&quot;mega-regex&quot;</span> <span class="st">&quot;regex&quot;</span>
vrn_t <span class="ot">&lt;-</span> T.pack <span class="fu">.</span> presentVrn <span class="fu">&lt;$&gt;</span> readCurrentVersion
test_release vrn_t
smy_t <span class="ot">&lt;-</span> summary
SH.shelly <span class="fu">$</span> SH.verbosely <span class="fu">$</span> <span class="kw">do</span>
SH.run_ <span class="st">&quot;git&quot;</span> [<span class="st">&quot;add&quot;</span>,<span class="st">&quot;--all&quot;</span>]
Expand Down Expand Up @@ -397,7 +398,26 @@ <h1 id="regex-cabal-gen">Regex Cabal Gen</h1>
lns <span class="ot">&lt;-</span> linesMatched <span class="dt">LinesMatched</span> <span class="fu">&lt;$&gt;</span> grepLines rex <span class="st">&quot;lib/md/roadmap-incl.md&quot;</span>
<span class="kw">case</span> lns <span class="kw">of</span>
[<span class="dt">Line</span> _ (<span class="dt">Matches</span> _ [mtch])] <span class="ot">-&gt;</span> return <span class="fu">$</span> TE.decodeUtf8 <span class="fu">$</span> LBS.toStrict <span class="fu">$</span> mtch <span class="fu">!$$</span> [cp<span class="fu">|</span>smy<span class="fu">|</span>]
_ <span class="ot">-&gt;</span> error <span class="st">&quot;failed to locate the summary text in the roadmap&quot;</span></code></pre></div>
_ <span class="ot">-&gt;</span> error <span class="st">&quot;failed to locate the summary text in the roadmap&quot;</span>

<span class="ot">test_release ::</span> <span class="dt">T.Text</span> <span class="ot">-&gt;</span> <span class="dt">IO</span> ()
test_release vrn_t <span class="fu">=</span> <span class="kw">do</span>
setCurrentDirectory <span class="st">&quot;releases/test&quot;</span>
SH.shelly <span class="fu">$</span> SH.verbosely <span class="fu">$</span> <span class="kw">do</span>
SH.rm_rf <span class="fu">$</span> SH.fromText <span class="st">&quot;test-regex&quot;</span>
SH.rm_rf <span class="fu">$</span> SH.fromText <span class="st">&quot;test-regex-with-pcre&quot;</span>
SH.rm_rf <span class="fu">$</span> SH.fromText <span class="st">&quot;test-regex-examples&quot;</span>
unpack <span class="st">&quot;regex&quot;</span>
unpack <span class="st">&quot;regex-with-pcre&quot;</span>
unpack <span class="st">&quot;regex-examples&quot;</span>
SH.run_ <span class="st">&quot;stack&quot;</span> [<span class="st">&quot;install&quot;</span>]
setCurrentDirectory <span class="st">&quot;../..&quot;</span>
<span class="kw">where</span>
unpack pn <span class="fu">=</span> <span class="kw">do</span>
SH.run_ <span class="st">&quot;tar&quot;</span> [<span class="st">&quot;xzf&quot;</span>,<span class="st">&quot;../&quot;</span><span class="fu">&lt;&gt;</span>pn_vrn<span class="fu">&lt;&gt;</span><span class="st">&quot;.tar.gz&quot;</span>]
SH.mv (SH.fromText pn_vrn) (SH.fromText <span class="fu">$</span> <span class="st">&quot;test-&quot;</span><span class="fu">&lt;&gt;</span>pn)
<span class="kw">where</span>
pn_vrn <span class="fu">=</span> pn<span class="fu">&lt;&gt;</span><span class="st">&quot;-&quot;</span><span class="fu">&lt;&gt;</span>vrn_t</code></pre></div>
<p>let vrn_res = concat [ show $ _vrn_a vrn, &quot;\.&quot;, show $ _vrn_b vrn, &quot;\.&quot;, show $ _vrn_c vrn, &quot;\.&quot;, show $ _vrn_d vrn ]</p>
</div> <script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
Expand Down
7 changes: 5 additions & 2 deletions docs/roadmap.html
Expand Up @@ -131,10 +131,13 @@ <h2 id="roadmap">
<input type='checkbox' class='task-list-item-checkbox' checked='' disabled=''/>2017-03-16 v0.8.0.0 <a href="https://github.com/iconnect/regex/milestone/10">Tidy up the API</a>
</li>
<li class="task-list-item">
<input type='checkbox' class='task-list-item-checkbox' checked='' disabled=''/>2017-03-18 v0.9.0.0 <a href="https://github.com/iconnect/regex/milestone/9">Finish tidying up the API, Add type-safe replacement templates and exploit TemplateHaskellQuotes</a>
<input type='checkbox' class='task-list-item-checkbox' checked='' disabled=''/>2017-03-24 v0.9.0.0 <a href="https://github.com/iconnect/regex/milestone/9">Finish tidying up the API, Add type-safe replacement templates and exploit TemplateHaskellQuotes</a>
</li>
<li class="task-list-item">
<input type='checkbox' class='task-list-item-checkbox' checked='' disabled=''/>2017-03-18 v0.10.0.0 <a href="https://github.com/iconnect/regex/milestone/11">Tweak TypeSafe SearchReplace templates</a>
<input type='checkbox' class='task-list-item-checkbox' checked='' disabled=''/>2017-03-25 v0.10.0.0 <a href="https://github.com/iconnect/regex/milestone/11">Tweak TypeSafe SearchReplace templates</a>
</li>
<li class="task-list-item">
<input type='checkbox' class='task-list-item-checkbox' checked='' disabled=''/>2017-03-26 v0.10.0.1 <a href="https://github.com/iconnect/regex/issues/88">Fix release</a>
</li>
<li class="task-list-item">
<input type='checkbox' class='task-list-item-checkbox' disabled=''/>2017-03-31 v1.0.0.0 <a href="https://github.com/iconnect/regex/milestone/3">First stable release</a>
Expand Down
22 changes: 21 additions & 1 deletion examples/re-gen-cabals.lhs
Expand Up @@ -113,7 +113,7 @@ gc_script ctx = Select
, LineEdit [re|^%Wwarn$|] $ w_warn_gen ctx
, LineEdit [re|^%filter-regex-with-pcre$|] $ w_filter_pcre ctx
, LineEdit [re|^%- +${pkg}(@{%id-}) +${cond}(.*)$|] $ cond_gen ctx
, LineEdit [re|^%build-depends-${lb}(lib|prog) +${list}(@{%id-}( +@{%id-})+)$|]
, LineEdit [re|^%build-depends-${lb}(lib|prog) +${list}(@{%id-}( +@{%id-})*)$|]
$ build_depends_gen ctx
, LineEdit [re|^%test +${i}(@{%id-})$|] $ test_exe_gen True False ctx
, LineEdit [re|^%exe +${i}(@{%id-})$|] $ test_exe_gen False True ctx
Expand Down Expand Up @@ -295,6 +295,7 @@ sdist = do
sdist' "regex-examples" "lib/README-regex-examples.md"
establish "mega-regex" "regex"
vrn_t <- T.pack . presentVrn <$> readCurrentVersion
test_release vrn_t
smy_t <- summary
SH.shelly $ SH.verbosely $ do
SH.run_ "git" ["add","--all"]
Expand Down Expand Up @@ -343,6 +344,25 @@ summary = do
case lns of
[Line _ (Matches _ [mtch])] -> return $ TE.decodeUtf8 $ LBS.toStrict $ mtch !$$ [cp|smy|]
_ -> error "failed to locate the summary text in the roadmap"
test_release :: T.Text -> IO ()
test_release vrn_t = do
setCurrentDirectory "releases/test"
SH.shelly $ SH.verbosely $ do
SH.rm_rf $ SH.fromText "test-regex"
SH.rm_rf $ SH.fromText "test-regex-with-pcre"
SH.rm_rf $ SH.fromText "test-regex-examples"
unpack "regex"
unpack "regex-with-pcre"
unpack "regex-examples"
SH.run_ "stack" ["install"]
setCurrentDirectory "../.."
where
unpack pn = do
SH.run_ "tar" ["xzf","../"<>pn_vrn<>".tar.gz"]
SH.mv (SH.fromText pn_vrn) (SH.fromText $ "test-"<>pn)
where
pn_vrn = pn<>"-"<>vrn_t
\end{code}


Expand Down
6 changes: 4 additions & 2 deletions lib/README-regex-examples.md
Expand Up @@ -62,9 +62,11 @@ two packages:

&nbsp;&nbsp;&nbsp;&nbsp;&#x2612;&nbsp;&nbsp;2017-03-16 v0.8.0.0 [Tidy up the API](https://github.com/iconnect/regex/milestone/10)

&nbsp;&nbsp;&nbsp;&nbsp;&#x2612;&nbsp;&nbsp;2017-03-18 v0.9.0.0 [Finish tidying up the API, Add type-safe replacement templates and exploit TemplateHaskellQuotes](https://github.com/iconnect/regex/milestone/9)
&nbsp;&nbsp;&nbsp;&nbsp;&#x2612;&nbsp;&nbsp;2017-03-24 v0.9.0.0 [Finish tidying up the API, Add type-safe replacement templates and exploit TemplateHaskellQuotes](https://github.com/iconnect/regex/milestone/9)

&nbsp;&nbsp;&nbsp;&nbsp;&#x2612;&nbsp;&nbsp;2017-03-18 v0.10.0.0 [Tweak TypeSafe SearchReplace templates](https://github.com/iconnect/regex/milestone/11)
&nbsp;&nbsp;&nbsp;&nbsp;&#x2612;&nbsp;&nbsp;2017-03-25 v0.10.0.0 [Tweak TypeSafe SearchReplace templates](https://github.com/iconnect/regex/milestone/11)

&nbsp;&nbsp;&nbsp;&nbsp;&#x2612;&nbsp;&nbsp;2017-03-26 v0.10.0.1 [Fix release](https://github.com/iconnect/regex/issues/88)

&nbsp;&nbsp;&nbsp;&nbsp;&#x2610;&nbsp;&nbsp;2017-03-31 v1.0.0.0 [First stable release](https://github.com/iconnect/regex/milestone/3)

Expand Down
6 changes: 4 additions & 2 deletions lib/README-regex.md
Expand Up @@ -62,9 +62,11 @@ two packages:

&nbsp;&nbsp;&nbsp;&nbsp;&#x2612;&nbsp;&nbsp;2017-03-16 v0.8.0.0 [Tidy up the API](https://github.com/iconnect/regex/milestone/10)

&nbsp;&nbsp;&nbsp;&nbsp;&#x2612;&nbsp;&nbsp;2017-03-18 v0.9.0.0 [Finish tidying up the API, Add type-safe replacement templates and exploit TemplateHaskellQuotes](https://github.com/iconnect/regex/milestone/9)
&nbsp;&nbsp;&nbsp;&nbsp;&#x2612;&nbsp;&nbsp;2017-03-24 v0.9.0.0 [Finish tidying up the API, Add type-safe replacement templates and exploit TemplateHaskellQuotes](https://github.com/iconnect/regex/milestone/9)

&nbsp;&nbsp;&nbsp;&nbsp;&#x2612;&nbsp;&nbsp;2017-03-18 v0.10.0.0 [Tweak TypeSafe SearchReplace templates](https://github.com/iconnect/regex/milestone/11)
&nbsp;&nbsp;&nbsp;&nbsp;&#x2612;&nbsp;&nbsp;2017-03-25 v0.10.0.0 [Tweak TypeSafe SearchReplace templates](https://github.com/iconnect/regex/milestone/11)

&nbsp;&nbsp;&nbsp;&nbsp;&#x2612;&nbsp;&nbsp;2017-03-26 v0.10.0.1 [Fix release](https://github.com/iconnect/regex/issues/88)

&nbsp;&nbsp;&nbsp;&nbsp;&#x2610;&nbsp;&nbsp;2017-03-31 v1.0.0.0 [First stable release](https://github.com/iconnect/regex/milestone/3)

Expand Down
4 changes: 0 additions & 4 deletions lib/cabal-masters/library-incl.cabal
@@ -1,7 +1,3 @@




Library
Hs-Source-Dirs: .
Exposed-Modules:
Expand Down

0 comments on commit 4454e44

Please sign in to comment.