Skip to content

Commit febdd45

Browse files
authored
Merge pull request #32 from duke-certification/develop
Primeira versão totalmente automatizada
2 parents 3cd5d31 + 0099ac4 commit febdd45

File tree

13 files changed

+265
-32
lines changed

13 files changed

+265
-32
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
book-output
22
book-release*
33

4+
### NODE.JS ###
5+
node_modules*
6+
npm-debug.log
7+
48
### OSX ###
59
*.DS_Store
610
._*
@@ -23,5 +27,8 @@ out
2327
# warn IDEA to ignore all files that won't be compiling due to educational examples
2428
!.idea/compiler.xml
2529

30+
# ignores local travis config folder
31+
.travis
32+
2633
### others ###
2734
.vscode

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

.releaserc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"plugins": [
3+
"@semantic-release/commit-analyzer",
4+
"@semantic-release/release-notes-generator",
5+
"@semantic-release/changelog",
6+
["@semantic-release/git", {
7+
"assets": ["package.json", "CHANGELOG.md"],
8+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
9+
}],
10+
"@semantic-release/github"
11+
]
12+
}

.travis.yml

Lines changed: 40 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,45 @@
1+
language: ruby
12
sudo: required
23

3-
services:
4-
- docker
5-
64
env:
7-
- COMPOSE_FILE=docker-compose.yml
8-
9-
script:
10-
- ls -lah
11-
- docker-compose run --rm ebook
5+
global:
6+
secure: eXGVND48r4WyUCELydGxJ5NZURQ5iSaMYT6sLyPAdsjoio5NO+/eF17Fw61YqljrSgy+SuYTtHSeVLET4VOVMry2AH2474UD4DDAZ0Fo21s/u/+wQzIW7szO+gzg+PB/22zM67Yx+9ICo+xm10juHwJRyse9s5EFCgL40LtHPWXc5iTbSJtQFbc3YqPMmrvZZE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uTi165vT8ABztgE8G5Z5lnOhPpezZ2dwLh64Do0BGOqMIsIC6Sx4XX8Pg7xnVXenfE+9AN2mCeZNq2tq0kTRqhclr+2T5IdUm9zB90I2VfK+6tuOPsb4DKhhJRtZsUZLMCIW4NA=
17-
file_glob: true
18-
file: book-release/*
19-
skip_cleanup: true
20-
on:
21-
tags: true
8+
jobs:
9+
include:
10+
- stage: "Semantic Release"
11+
name: "Generate a new release and changelogs"
12+
language: node_js
13+
node_js: lts/*
14+
os:
15+
- linux
16+
install:
17+
- npm install
18+
script: skip
19+
deploy:
20+
provider: script
21+
api_key: "$GITHUB_TOKEN"
22+
node_js: lts/*
23+
skip_cleanup: true
24+
script: npx semantic-release
25+
on:
26+
branch: master
2227

23-
notifications:
24-
email:
25-
28+
- stage: "GitHub Release"
29+
name: "Send the generated files to the new GitHub release"
30+
services:
31+
- docker
32+
env:
33+
- COMPOSE_FILE=docker-compose.yml
34+
script:
35+
- TRAVIS_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
36+
- git shortlog -s | cut -f 2- > book/contributors.txt
37+
- docker-compose run --rm ebook $TRAVIS_TAG
38+
deploy:
39+
provider: releases
40+
api_key: "$GITHUB_TOKEN"
41+
file_glob: true
42+
file: book-release/*
43+
skip_cleanup: true
44+
on:
45+
branch: master

LICENSE.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018 Rodrigo Moutinho
3+
Copyright (c) 2019 Rinaldo Pitzer e Rodrigo Moutinho
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

book/contributors.asc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[preface]
2+
== Contribuidores
3+
4+
Por ser um livro de código aberto, recebemos várias mudanças de conteúdo e erratas ao longo de seu desenvolvimento. Aqui estão todas as pessoas que contribuíram para a versão em português do livro como um projeto de código aberto. Obrigado a todos por ajudarem a tornar este livro melhor para todos.
5+
6+
[source,tabsize=8]
7+
----
8+
include::contributors.txt[]
9+
----
10+
11+
Esse texto é praticamente o mesmo utilizado no *Pro Git 2*. Acesse o texto original https://raw.githubusercontent.com/progit/progit2/master/book/contributors.asc[aqui].

book/license.asc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[preface]
2+
== Licença
3+
4+
include::../LICENSE.asc[]

changelog.config.js

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
module.exports = {
2+
"disableEmoji": false,
3+
"list": [
4+
"test",
5+
"feat",
6+
"fix",
7+
"chore",
8+
"docs",
9+
"refactor",
10+
"style",
11+
"ci",
12+
"perf"
13+
],
14+
"maxMessageLength": 64,
15+
"minMessageLength": 3,
16+
"questions": [
17+
"type",
18+
"scope",
19+
"subject",
20+
"body",
21+
"breaking",
22+
"issues",
23+
"lerna"
24+
],
25+
"scopes": [
26+
"",
27+
"core",
28+
"lang-enh",
29+
"localization",
30+
"lambda",
31+
"streams",
32+
"concurrency",
33+
"file-io",
34+
"collections"
35+
],
36+
"types": {
37+
"chore": {
38+
"description": "Build process or auxiliary tool changes",
39+
"emoji": "🤖",
40+
"value": "chore"
41+
},
42+
"ci": {
43+
"description": "CI related changes",
44+
"emoji": "🎡",
45+
"value": "ci"
46+
},
47+
"docs": {
48+
"description": "Documentation only changes",
49+
"emoji": "📓",
50+
"value": "docs"
51+
},
52+
"feat": {
53+
"description": "A new feature",
54+
"emoji": "🎸",
55+
"value": "feat"
56+
},
57+
"fix": {
58+
"description": "A bug fix",
59+
"emoji": "🐛",
60+
"value": "fix"
61+
},
62+
"perf": {
63+
"description": "A code change that improves performance",
64+
"emoji": "⚡️",
65+
"value": "perf"
66+
},
67+
"refactor": {
68+
"description": "A code change that neither fixes a bug or adds a feature",
69+
"emoji": "💡",
70+
"value": "refactor"
71+
},
72+
"release": {
73+
"description": "Create a release commit",
74+
"emoji": "🏹",
75+
"value": "release"
76+
},
77+
"style": {
78+
"description": "Markup, white-space, formatting, missing semi-colons...",
79+
"emoji": "💄",
80+
"value": "style"
81+
},
82+
"test": {
83+
"description": "Adding missing tests",
84+
"emoji": "💍",
85+
"value": "test"
86+
}
87+
}
88+
};

docker-compose.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,14 @@ services:
55
image: asciidoctor/docker-asciidoctor
66
volumes:
77
- .:/documents/
8-
command: scripts/docker-startup.sh
8+
entrypoint: scripts/docker-startup.sh
9+
network_mode: bridge
10+
11+
travis:
12+
build:
13+
context: .
14+
dockerfile: ./docker/travis/Dockerfile
15+
volumes:
16+
- .:/app
17+
- ./.travis:/root/.travis
918
network_mode: bridge

docker/travis/Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM ruby:alpine
2+
3+
RUN apk --update add build-base git \
4+
&& gem install travis \
5+
&& apk del build-base \
6+
&& rm -rf /var/cache/apk/* \
7+
&& rm -rf /tmp/* \
8+
&& mkdir app
9+
10+
WORKDIR app
11+
VOLUME ["/app"]
12+
13+
LABEL maintainer="twitter.com/rcmoutinho"
14+
LABEL description="Travis CLI in a docker container"
15+
16+
ENTRYPOINT ["travis"]
17+
CMD ["--help"]

0 commit comments

Comments
 (0)