Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
course-material
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
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
IT1901
course-material
Commits
b1e80d44
Commit
b1e80d44
authored
5 years ago
by
George Adrian Stoica
Browse files
Options
Downloads
Patches
Plain Diff
work on support for windows
parent
da759cf4
No related branches found
No related tags found
No related merge requests found
Pipeline
#53413
passed
5 years ago
Stage: build
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
lectures/build.gradle
+38
-16
38 additions, 16 deletions
lectures/build.gradle
lectures/pdfslides.bat
+14
-0
14 additions, 0 deletions
lectures/pdfslides.bat
lectures/pdfslides.sh
+7
-7
7 additions, 7 deletions
lectures/pdfslides.sh
lectures/pdfslides2.bat
+14
-0
14 additions, 0 deletions
lectures/pdfslides2.bat
with
73 additions
and
23 deletions
lectures/build.gradle
+
38
−
16
View file @
b1e80d44
...
...
@@ -120,22 +120,21 @@ task checkDocker {
doLast
{
def
result
=
1
if
(
Os
.
isFamily
(
Os
.
FAMILY_WINDOWS
))
{
println
"windows os"
result
=
exec
{
def
command
=
"/c docker --version"
ignoreExitValue
=
true
executable
"cmd"
args
command
}
println
"windows os"
result
=
exec
{
def
command
=
"/c docker --version"
ignoreExitValue
=
true
executable
"cmd"
args
command
}
}
else
{
//we assume linux/mac with bash if not having windows -
//more fine tuned testing can be done if needed
println
"linux / unix os"
result
=
exec
{
def
command
=
"command -v docker"
ignoreExitValue
=
true
executable
"bash"
args
"-l"
,
"-c"
,
command
}
//we assume linux/mac with bash if not having windows -
//more fine tuned testing can be done if needed
println
"linux / unix os"
result
=
exec
{
def
command
=
"command -v docker"
ignoreExitValue
=
true
executable
"bash"
args
"-l"
,
"-c"
,
command
}
}
if
(
result
.
getExitValue
()==
0
){
...
...
@@ -149,15 +148,38 @@ task checkDocker {
}
task
pdfSlides
{
doLast
{
if
(
dockerAvailable
){
if
(
Os
.
isFamily
(
Os
.
FAMILY_WINDOWS
))
{
println
"run windows script"
def
result
=
exec
{
workingDir
=
'.'
ignoreExitValue
=
true
commandLine
'cmd'
,
'/c'
,
'pdfslides.bat'
}
if
(
result
.
getExitValue
()==
0
){
println
"export successful"
}
else
{
print
"export to pdf failed"
}
}
else
{
def
result
=
exec
{
def
command
=
"pdfslides.sh"
ignoreExitValue
=
true
executable
"bash"
args
"-l"
,
"-c"
,
command
}
if
(
result
.
getExitValue
()==
0
){
println
"export successful"
}
else
{
print
"export to pdf failed"
}
println
"run linux / unix script"
}
}
else
{
println
"docker is not available on this machine"
}
}
}
build
.
dependsOn
'asciidoctorRevealJs'
...
...
This diff is collapsed.
Click to expand it.
lectures/pdfslides.bat
0 → 100644
+
14
−
0
View file @
b1e80d44
SETLOCAL
ENABLEEXTENSIONS
SETLOCAL
ENABLEDELAYEDEXPANSION
SET
CURRENT_PATH
=
%~dp0
SET
"URL_SLIDES=https://gitlab.stud.idi.ntnu.no/it1901/course-material/-/jobs/artifacts/master/file/lectures/build/docs/revealjs/"
rem using 2.9 as the latest vesion is not working properly in our case
SET
"DOCKER_PARAMS=run --rm -t -v
^"
%CURRENT_PATH%
build\docs\pdf
^"
:/slides astefanutti/decktape:2.9 --size=1280x1000"
docker
%DOCKER_PARAMS%
%URL_SLIDES%
course
-intro
.html
?
job
=
build
01
.a.course
-intro-slides
.pdf
docker
%DOCKER_PARAMS%
%URL_SLIDES%
02
-software-development
.html
?
job
=
build
02
.a.software
-development-slides
.pdf
docker
%DOCKER_PARAMS%
%URL_SLIDES%
scm
.html
?
job
=
build
02
.b.source
-code-management
.pdf
docker
%DOCKER_PARAMS%
%URL_SLIDES%
03
-build-tools-and-some-testing
.html
?
job
=
build
03
-build-tools-and-some-testing
.pdf
docker
%DOCKER_PARAMS%
%URL_SLIDES%
07
-documentation
.html
?
job
=
build
07
.b.
-documentation
.pdf
docker
%DOCKER_PARAMS%
%URL_SLIDES%
08
-workflow-example
.html
?
job
=
build
08
.workflow
-example
.pdf
\ No newline at end of file
This diff is collapsed.
Click to expand it.
lectures/pdfslides.sh
+
7
−
7
View file @
b1e80d44
...
...
@@ -2,12 +2,12 @@
URL_SLIDES
=
"https://gitlab.stud.idi.ntnu.no/it1901/course-material/-/jobs/artifacts/master/file/lectures/build/docs/revealjs/"
#using 2.9 as the latest vesion is not working properly in our case
DOCKER_PARAMS
=
"run --rm -t -v
`
pwd
`
:/slides astefanutti/decktape:2.9"
DOCKER_PARAMS
=
"run --rm -t -v
`
pwd
`
:/slides astefanutti/decktape:2.9
--size=1280x1000
"
docker
${
DOCKER_PARAMS
}
--size
=
1280x1000
${
URL_SLIDES
}
course-intro.html?job
=
build 01.a.course-intro-slides.pdf
docker
${
DOCKER_PARAMS
}
--size
=
1280x1000
${
URL_SLIDES
}
02-software-development.html?job
=
build 02.a.software-development-slides.pdf
docker
${
DOCKER_PARAMS
}
--size
=
1280x1000
${
URL_SLIDES
}
scm.html?job
=
build 02.b.source-code-management.pdf
docker
${
DOCKER_PARAMS
}
--size
=
1280x1000
${
URL_SLIDES
}
03-build-tools-and-some-testing.html?job
=
build 03-build-tools-and-some-testing.pdf
docker
${
DOCKER_PARAMS
}
--size
=
1280x1000
${
URL_SLIDES
}
07-documentation.html?job
=
build 07.b.-documentation.pdf
docker
${
DOCKER_PARAMS
}
--size
=
1280x1000
${
URL_SLIDES
}
08-workflow-example.html?job
=
build 08.workflow-example.pdf
docker
${
DOCKER_PARAMS
}
${
URL_SLIDES
}
course-intro.html?job
=
build 01.a.course-intro-slides.pdf
docker
${
DOCKER_PARAMS
}
${
URL_SLIDES
}
02-software-development.html?job
=
build 02.a.software-development-slides.pdf
docker
${
DOCKER_PARAMS
}
${
URL_SLIDES
}
scm.html?job
=
build 02.b.source-code-management.pdf
docker
${
DOCKER_PARAMS
}
${
URL_SLIDES
}
03-build-tools-and-some-testing.html?job
=
build 03-build-tools-and-some-testing.pdf
docker
${
DOCKER_PARAMS
}
${
URL_SLIDES
}
07-documentation.html?job
=
build 07.b.-documentation.pdf
docker
${
DOCKER_PARAMS
}
${
URL_SLIDES
}
08-workflow-example.html?job
=
build 08.workflow-example.pdf
This diff is collapsed.
Click to expand it.
lectures/pdfslides2.bat
0 → 100644
+
14
−
0
View file @
b1e80d44
SETLOCAL
ENABLEEXTENSIONS
SETLOCAL
ENABLEDELAYEDEXPANSION
SET
CURRENT_PATH
=
%~dp0
SET
"URL_SLIDES=/revealjs/"
rem using 2.9 as the latest vesion is not working properly in our case
SET
"DOCKER_PARAMS=run --rm -t -v
^"
%CURRENT_PATH%
build\docs\pdf
^"
:/slides -v
^"
%CURRENT_PATH%
build\docs\revealjs
^"
:/revealjs astefanutti/decktape:2.9 --size=1280x1000 --chrome-arg=--allow-file-access-from-files"
docker
%DOCKER_PARAMS%
"
%URL_SLIDES%
course-intro.html"
01
.a.course
-intro-slides
.pdf
docker
%DOCKER_PARAMS%
%URL_SLIDES%
02
-software-development
.html
02
.a.software
-development-slides
.pdf
docker
%DOCKER_PARAMS%
%URL_SLIDES%
scm
.html
02
.b.source
-code-management
.pdf
docker
%DOCKER_PARAMS%
%URL_SLIDES%
03
-build-tools-and-some-testing
.html
03
-build-tools-and-some-testing
.pdf
docker
%DOCKER_PARAMS%
%URL_SLIDES%
07
-documentation
.html
07
.b.
-documentation
.pdf
docker
%DOCKER_PARAMS%
%URL_SLIDES%
08
-workflow-example
.html
08
.workflow
-example
.pdf
\ No newline at end of file
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