Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jsexplain
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Verified Software
jsexplain
Commits
871b6960
Commit
871b6960
authored
8 years ago
by
Thomas Wood
Browse files
Options
Downloads
Patches
Plain Diff
Latest commit is now published to
https://jscert.github.io/jsexplain/branch/master
parent
b8dc3441
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
.travis.yml
+29
-0
29 additions, 0 deletions
.travis.yml
Makefile
+24
-10
24 additions, 10 deletions
Makefile
tools/upload-github-pages.sh
+52
-0
52 additions, 0 deletions
tools/upload-github-pages.sh
with
106 additions
and
10 deletions
.gitignore
+
1
−
0
View file @
871b6960
node_modules/*
node_modules/*
!node_modules/esprima
!node_modules/esprima
dist
This diff is collapsed.
Click to expand it.
.travis.yml
0 → 100644
+
29
−
0
View file @
871b6960
language
:
c
sudo
:
required
install
:
-
wget https://raw.githubusercontent.com/ocaml/ocaml-ci-scripts/master/.travis-ocaml.sh
-
bash -ex .travis-ocaml.sh
-
make init
-
eval `opam config env`
script
:
-
make
env
:
global
:
-
OCAML_VERSION=4.03
-
OPAMYES=true
os
:
-
linux
-
osx
deploy
:
skip_cleanup
:
true
provider
:
script
script
:
make publish-github
on
:
condition
:
$TRAVIS_OS_NAME = linux
all_branches
:
true
This diff is collapsed.
Click to expand it.
Makefile
+
24
−
10
View file @
871b6960
PUB_FILES
=
driver.html libraries jquery-ui-1.11.4.custom jquery_scroll
\
all
:
generator mljsref jsjsref
jsref/displayed_sources.js tools.js node_modules/esprima/esprima.js
\
esprima-to-ast.js jsref/lineof.js navig-driver.js
\
jsref/assembly.js
all
:
generator jsjsref mljsref
# Init stages
init
:
init
:
opam switch 4.03.0
opam switch 4.03.0
eval
`
opam config
env
`
eval
`
opam config
env
`
...
@@ -12,9 +8,7 @@ init:
...
@@ -12,9 +8,7 @@ init:
opam pin
-yn
add JS_Parser
"https://github.com/resource-reasoning/JS_Parser.git#v0.1.0"
opam pin
-yn
add JS_Parser
"https://github.com/resource-reasoning/JS_Parser.git#v0.1.0"
opam
install
-y
jsjsref
--deps-only
opam
install
-y
jsjsref
--deps-only
publish
:
generator $(PUB_FILES)
# Build Stages
rsync
-azR
--no-p
--rsh
=
ssh
-O
$^
gf:/home/groups/ajacs/htdocs/jsexplain/
generator
:
generator
:
$(
MAKE
)
-C
generator
$(
MAKE
)
-C
generator
...
@@ -27,6 +21,7 @@ jsjsref: generator
...
@@ -27,6 +21,7 @@ jsjsref: generator
mljsref
:
generator-stdlib
mljsref
:
generator-stdlib
$(
MAKE
)
-C
jsref mljsref
$(
MAKE
)
-C
jsref mljsref
# Test Stages
test_init
:
test_init
:
git submodule update
--init
test
/test262
git submodule update
--init
test
/test262
npm
install
npm
install
...
@@ -34,8 +29,27 @@ test_init:
...
@@ -34,8 +29,27 @@ test_init:
test
:
jsjsref
test
:
jsjsref
node_modules/.bin/mocha
node_modules/.bin/mocha
# Publication Stages
PUB_FILES
=
driver.html libraries jquery-ui-1.11.4.custom jquery_scroll
\
jsref/displayed_sources.js tools.js node_modules/esprima/esprima.js
\
esprima-to-ast.js jsref/lineof.js navig-driver.js
\
jsref/assembly.js
dist
:
jsjsref $(PUB_FILES)
mkdir
-p
$@
cp
-r
$(
PUB_FILES
)
$@
publish
:
dist
# /./ syntax tells rsync where to start relative paths from
rsync
-azR
--no-p
--rsh
=
ssh
-O
$^
/./ gf:/home/groups/ajacs/htdocs/jsexplain/
publish-github
:
dist
tools/upload-github-pages.sh dist
# Clean stages
clean
:
clean
:
$(
MAKE
)
-C
generator clean
$(
MAKE
)
-C
generator clean
$(
MAKE
)
-C
jsref clean
$(
MAKE
)
-C
jsref clean
rm
-Rf
dist
||
true
.PHONY
:
publish
jsjsref mljsref generator generator-stdlib test_init test clean
.PHONY
:
jsjsref mljsref generator generator-stdlib test_init test
publish publish-github
clean
This diff is collapsed.
Click to expand it.
tools/upload-github-pages.sh
0 → 100755
+
52
−
0
View file @
871b6960
#!/bin/sh
# Uploads given directory (default: dist) to gh-pages branch under directory <branch name>
# usage: upload-github-pages.sh [directory]
set
-e
set
+x
if
[
-z
"
$TRAVIS
"
-o
"
$TRAVIS_PULL_REQUEST
"
!=
"false"
]
;
then
echo
"This is not a push Travis-ci build, doing nothing..."
exit
0
else
echo
"Deploying to Github pages..."
fi
DOCDIR
=
.gh-pages
DEPLOY_SRC
=
${
1
:-
dist
}
DEPLOY_TARGET
=
${
TRAVIS_TAG
:+tag/
$TRAVIS_TAG
}
DEPLOY_TARGET
=
${
DEPLOY_TARGET
:-
branch
/
$TRAVIS_BRANCH
}
REDACT_PATTERN
=
""
# Error out if $GH_TOKEN and $DH_DEPLOY_KEY are empty or unset
if
[
-n
"
$GH_TOKEN
"
]
;
then
REPO
=
"https://
${
GH_TOKEN
}
@github.com/
${
TRAVIS_REPO_SLUG
}
.git"
REDACT_PATTERN
=
"s/
$GH_TOKEN
/!REDACTED!/g"
elif
[
-n
"
$GH_DEPLOY_KEY
"
]
;
then
# $GH_DEPLOY_KEY should be inserted into project settings quoted and with newlines escaped as \n
eval
`
ssh-agent
`
printf
"%b"
"
$GH_DEPLOY_KEY
"
| ssh-add /dev/stdin
REPO
=
"git@github.com:
${
TRAVIS_REPO_SLUG
}
.git"
else
echo
"GH_TOKEN or GH_DEPLOY_KEY variable must be set"
exit
1
fi
git clone
$REPO
$DOCDIR
2>&1 |
sed
-e
"
$REDACT_PATTERN
"
git
-C
$DOCDIR
checkout gh-pages
||
(
git
-C
$DOCDIR
checkout
--orphan
gh-pages
&&
find
$DOCDIR
\!
\(
-path
"*/.git/*"
-o
-path
"*/.git"
-o
-path
"
$DOCDIR
"
\)
-delete
)
rm
-Rf
$DOCDIR
/
$DEPLOY_TARGET
||
true
mkdir
-p
$DOCDIR
/
$DEPLOY_TARGET
cp
-rT
$DEPLOY_SRC
$DOCDIR
/
$DEPLOY_TARGET
git
-C
$DOCDIR
add
-A
.
git
-C
$DOCDIR
config user.email
"travis@travis-ci.org"
git
-C
$DOCDIR
config user.name
"Travis"
git
-C
$DOCDIR
commit
--allow-empty
-m
"Travis build
$TRAVIS_BUILD_NUMBER
for
$TRAVIS_BRANCH
$TRAVIS_COMMIT
pushed docs to gh-pages"
git
-C
$DOCDIR
push origin gh-pages 2>&1 |
sed
-e
"
$REDACT_PATTERN
"
if
[
-n
"
$GH_DEPLOY_KEY
"
]
;
then
eval
`
ssh-agent
-k
`
;
fi
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment