Skip to content

Commit

Permalink
Merge pull request #144 from garden-io/no-ruby
Browse files Browse the repository at this point in the history
chore: get rid of ruby and copyright-header dependency
  • Loading branch information
edvald committed Jun 4, 2018
2 parents 50af640 + 4299c18 commit 69bbcf1
Show file tree
Hide file tree
Showing 11 changed files with 6,256 additions and 5,359 deletions.
15 changes: 9 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,22 @@ jobs:
- setup_remote_docker:
docker_layer_caching: true

- run:
name: Install apt dependencies
command: sudo apt install rsync cmake libicu-dev pkg-config

- run:
name: Install kubectl
command: |
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.10.0/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
# Download and cache dependencies
- restore_cache:
keys:
- v2-dependencies-{{ checksum "package-lock.json" }}
# fallback to using the latest cache if no exact match is found
- v2-dependencies-

- run:
command: |
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.10.0/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
- run: sudo apt install rsync ruby ruby-dev cmake libicu-dev pkg-config
- run: sudo gem install --no-document copyright-header
- run: npm install

- save_cache:
Expand Down
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ the build locally.
### License/copyright headers

Every source file must include the contents of `static/license-header.txt` at the top. This is
automatically checked during CI. You can run the check with `npm run check-licenses` and you can
automatically add the header to new sources using `npm run add-licenses`.
automatically checked during CI. You can run the check with `npm run check-licenses`.

### Release process

Expand Down
8 changes: 0 additions & 8 deletions bin/add-licenses

This file was deleted.

3 changes: 1 addition & 2 deletions bin/bootstrap-osx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

# install/update homebrew dependencies
BREW_DEPS="cmake git kubectl stern rsync ruby watchman icu4c pkg-config yarn"
BREW_DEPS="cmake git kubectl stern rsync watchman icu4c pkg-config yarn"

brew update
brew install ${BREW_DEPS}
Expand All @@ -20,7 +20,6 @@ nvm alias default 9.4

# install/update global packages
npm install -g gulp-cli@4.0.0
gem install --no-document copyright-header

# install CircleCI CLI
curl -o /usr/local/bin/circleci https://circle-downloads.s3.amazonaws.com/releases/build_agent_wrapper/circleci
Expand Down
21 changes: 0 additions & 21 deletions bin/check-licenses

This file was deleted.

12 changes: 10 additions & 2 deletions gulpfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { generateDocs } from "./src/docs/generate"

const gulp = require("gulp")
const cached = require("gulp-cached")
const checkLicense = require("gulp-license-check")
const excludeGitIgnore = require("gulp-exclude-gitignore")
// const debug = require("gulp-debug")
// const exec = require("gulp-exec")
Expand All @@ -30,6 +31,7 @@ const testTsSources = "test/**/*.ts"
const pegjsSources = "src/*.pegjs"

const staticFiles = ["package.json", "package-lock.json", "static/**/*", ".snyk"]
const licenseHeaderPath = "static/license-header.txt"

let destDir = "build"

Expand Down Expand Up @@ -111,8 +113,14 @@ gulp.task("add-version-files", (cb) => {
})
})

gulp.task("check-licenses", (cb) =>
spawn("./bin/check-licenses", [], cb),
gulp.task("check-licenses", () =>
gulp.src([tsSources, pegjsSources])
.pipe(checkLicense({
path: licenseHeaderPath,
blocking: true,
logInfo: false,
logError: true,
})),
)

gulp.task("generate-docs", (cb) => {
Expand Down
Loading

0 comments on commit 69bbcf1

Please sign in to comment.