Skip to content

Commit 8f1ddc7

Browse files
committed
remove .sh extensions, add test
1 parent 65d4318 commit 8f1ddc7

File tree

9 files changed

+18
-33
lines changed

9 files changed

+18
-33
lines changed

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# orderly 1.5.0
22

33
* Add `prepare_git_example_from_source` which can be used to generate a git controlled orderly directory
4-
from a source, and another entrypoint `run_orderly_demo.sh` that exposes this function, for use in testing OrderlyWeb (mrc-3665)
4+
from a source, and another entrypoint `run_orderly_demo` that exposes this function, for use in testing OrderlyWeb (mrc-3665)
55

66
# orderly 1.4.7
77

docker/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ ENV ORDERLY_VERSION $ORDERLY_VERSION
5252
COPY . /orderly
5353
RUN R CMD INSTALL /orderly && \
5454
Rscript -e 'orderly:::write_script("/usr/bin")' && \
55-
cp /orderly/inst/create_orderly_demo.sh /usr/bin/ && \
56-
cp /orderly/inst/run_orderly_demo.sh /usr/bin/ && \
55+
cp /orderly/inst/create_orderly_demo /usr/bin/ && \
56+
cp /orderly/inst/run_orderly_demo /usr/bin/ && \
5757
rm -rf /orderly
5858

5959
ENTRYPOINT ["/usr/bin/orderly"]

docker/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Create a demo orderly store (change `demo` to put it elsewhere - `"."` should be fine if the current directory is empty)
44

55
```
6-
docker run --rm --entrypoint create_orderly_demo.sh \
6+
docker run --rm --entrypoint create_orderly_demo \
77
-u ${UID} \
88
-v ${PWD}:/orderly \
99
-w /orderly \

docker/create_demo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ rm -rf $DEST
1313
# In case we switch agents between steps
1414
[ ! -z $(docker images -q $TAG_SHA) ] || docker pull $TAG_SHA
1515

16-
docker run --rm --entrypoint create_orderly_demo.sh \
16+
docker run --rm --entrypoint create_orderly_demo \
1717
--user "$USER_STR" \
1818
--env HOME=/tmp \
1919
-v "${PWD}":/orderly \

docker/teamcity-demo.sh

Lines changed: 0 additions & 27 deletions
This file was deleted.

inst/examples/demo/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ path <- orderly:::create_orderly_demo()
5454
which will create a new directory with all the output in it. This is also run on teamcity to create an artefact `demo`, and also run via docker as
5555

5656
```sh
57-
docker run --entrypoint create_orderly_demo.sh \
57+
docker run --entrypoint create_orderly_demo \
5858
-v $projectDir:/orderly \
5959
-w /orderly vimc/orderly:master \
6060
demo

tests/testthat/test-testing.R

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,15 @@ test_that("create_orderly_demo can create a git repo", {
1616
expect_true(file.exists(file.path(path, ".git")))
1717
expect_true(same_path(gert::git_pull(repo = path), path))
1818
})
19+
20+
21+
test_that("can create an orderly git repo from given source", {
22+
skip_on_cran()
23+
path <- tempfile()
24+
dir.create(file.path(path))
25+
source <- system.file("examples/demo", package = "orderly")
26+
prepare_git_example_from_source(source, path)
27+
expect_true(file.exists(file.path(path, ".git")))
28+
expect_true(dir.exists(file.path(path, "archive")))
29+
expect_true(same_path(gert::git_pull(repo = path), path))
30+
})

0 commit comments

Comments
 (0)