Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/prosyslab/dude
Browse files Browse the repository at this point in the history
  • Loading branch information
Allgot committed Mar 2, 2023
2 parents 6d2f5bc + 4596085 commit 4bac8d6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 21 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM prosyslab/dude:contain-test
FROM prosyslab/dude:latest
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
ENTRYPOINT ["/entrypoint.sh"]
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ This action is triggered when a new issue has been created.
Then it compares the new issue's contents with existing issues' contents, and detect possible duplications.
If any possible duplication is detected, it will inform the issuer through comment.

**This action is partial: to use this action, you should copy `dune`, `dune-project` and `dup_scan.ml` from [the underlying repository](https://github.com/prosyslab/dude) into the root directory of your repository.**

## Inputs

## `issue_num`
Expand Down
8 changes: 8 additions & 0 deletions base/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM prosyslab/classroom

RUN echo "1234" | sudo -S apt update
RUN echo "1234" | sudo -S apt install -y libssl-dev
RUN opam install -y cohttp-lwt-unix lwt_ssl
RUN git clone https://github.com/prosyslab/dude.git
WORKDIR dude
RUN eval $(opam env); dune build dup_scan.exe
20 changes: 3 additions & 17 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
#!/bin/bash -l
#!/bin/bash

# Initializing
env CAML_LD_LIBRARY_PATH=/root/.opam/default/lib/stublibs:/root/.opam/default/lib/ocaml/stublibs:/root/.opam/default/lib/ocaml > /dev/null
env OCAML_TOPLEVEL_PATH=/root/.opam/default/lib/toplevel > /dev/null
env PKG_CONFIG_PATH=/root/.opam/default/lib/pkgconfig > /dev/null
env HOSTNAME=32638fc6e417 > /dev/null
env PWD=/ > /dev/null
env MANPATH=:/root/.opam/default/man > /dev/null
env OPAM_SWITCH_PREFIX=/root/.opam/default > /dev/null
env HOME=/root > /dev/null
# env LESSCLOSE=/usr/bin/lesspipe %s %s > /dev/null
env TERM=xterm > /dev/null
env LESSOPEN=| /usr/bin/lesspipe %s > /dev/null
env OLDPWD=/roote > /dev/null
PATH=/root/.opam/default/bin:$PATH > /dev/null

dune exec ./dup_scan.exe $1 "contents:$2" $3 $4 "$5" "$6" # $1: issue_num, $2: issue_contents, $3: repository_path_name, $4: rapid_key, $5: repo_key, $6: threshold
# $1: issue_num, $2: issue_contents, $3: repository_path_name, $4: rapid_key, $5: repo_key, $6: threshold
/home/student/dude/_build/default/dup_scan.exe $1 "contents:$2" $3 $4 "$5" "$6"

0 comments on commit 4bac8d6

Please sign in to comment.