Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v3] Prepare for v3 #936

Merged
merged 35 commits into from
Feb 5, 2021
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
eb6e155
Add docs/reference split
ErikSchierboom Feb 26, 2020
505a76f
Replace examples of kebab-case and PascalCase
sshine Feb 5, 2020
ec4de07
Elaborate on exercise design, fix typos
sshine Feb 5, 2020
c35c8c3
Sync v2 and v3 directory structure
sshine Feb 6, 2020
0f9b8bf
Make after.md required
ErikSchierboom Apr 2, 2020
20188d6
Add reference to required reading in implementing guide
ErikSchierboom Apr 10, 2020
dc8817f
Add reference to Concept Exercise Anatomy video
ErikSchierboom Apr 14, 2020
9cfe778
Shared docs CLI and Debug
zuzia-kru Apr 15, 2020
293196f
Cross-reference concept exercise file information
ErikSchierboom Apr 23, 2020
8a6d47c
Docs: change case of `haskell` directory
ynfle Oct 6, 2020
dc16e64
Add description of concept documents
ErikSchierboom Nov 11, 2020
eeee459
Convert example to exemplar
ErikSchierboom Jan 28, 2021
9c95296
[v3] Move existing exercises to exercises/practice
ErikSchierboom Jan 29, 2021
a396e26
[v3] Add version property to config.json
ErikSchierboom Jan 29, 2021
c5c3d11
[v3] Add status to config.json
ErikSchierboom Jan 29, 2021
5c4039d
[v3] Add slug to config.json
ErikSchierboom Jan 29, 2021
ae368cf
[v3] Add online_editor property to config.json
ErikSchierboom Jan 29, 2021
a246713
[v3] Add status for deprecated practice exercises in config.json
ErikSchierboom Jan 29, 2021
f04e486
[v3] Re-order practice exercises in config.json
ErikSchierboom Jan 29, 2021
fb07df2
[v3] Remove deprecated properties from practice exercises in config.json
ErikSchierboom Jan 29, 2021
a5b7b77
[v3] Add name property to practice exercises in config.json
ErikSchierboom Jan 29, 2021
51403f7
[v3] Add (empty) prerequisites property to practice exercises in conf…
ErikSchierboom Jan 29, 2021
5c71ed7
[v3] Move exercises to practice exercises property in config.json
ErikSchierboom Jan 29, 2021
4a5ae88
[v3] Move foregone exercises to exercises property in config.json
ErikSchierboom Jan 29, 2021
0ec8810
[v3] Add concept exercises to config.json
ErikSchierboom Jan 29, 2021
499ee26
[v3] Add concepts to config.json
ErikSchierboom Jan 29, 2021
23a9fb2
[v3] Add key features to config.json
ErikSchierboom Jan 29, 2021
1b90d6b
[v3] Add tags to config.json
ErikSchierboom Jan 29, 2021
a3ed388
[v3] Add configlet CI workflow
ErikSchierboom Jan 29, 2021
ca6b14a
[v3] Update fetch-configlet script to work with configlet v3
ErikSchierboom Jan 29, 2021
f61c7da
[v3] Add dependabot to keep GHA dependencies up-to-date
ErikSchierboom Jan 29, 2021
94ce78d
[v3] Convert relative v3 links to absolute links
ErikSchierboom Jan 29, 2021
22e0b2e
[v3] Fix configlet CI workflow
ErikSchierboom Jan 29, 2021
940aa5c
Rewrite "How to implement a Haskell concept exercise"
sshine Feb 3, 2021
d6ceb1c
README "Port or create an exercise": Mention concept exercises
sshine Feb 3, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2

updates:

# Keep dependencies for GitHub Actions up-to-date
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'daily'
16 changes: 16 additions & 0 deletions .github/workflows/configlet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Configlet CI

on: [push, pull_request, workflow_dispatch]

jobs:
configlet:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f

- name: Fetch configlet
uses: exercism/github-actions/configlet-ci@main

- name: Configlet Linter
run: configlet lint
92 changes: 58 additions & 34 deletions bin/fetch-configlet
Original file line number Diff line number Diff line change
@@ -1,34 +1,58 @@
#!/bin/bash

LATEST=https://github.com/exercism/configlet/releases/latest

OS=$(
case $(uname) in
(Darwin*)
echo "mac";;
(Linux*)
echo "linux";;
(Windows*)
echo "windows";;
(*)
echo "linux";;
esac)

ARCH=$(
case $(uname -m) in
(*64*)
echo 64bit;;
(*686*)
echo 32bit;;
(*386*)
echo 32bit;;
(*)
echo 64bit;;
esac)

VERSION="$(curl --head --silent $LATEST | perl -nE 's/\R//g; /^location:/i && print [split/\//]->[-1]')"
URL="https://github.com/exercism/configlet/releases/download/$VERSION/configlet-$OS-${ARCH}.tgz"
echo "VERSION = $VERSION"
echo "URL = $URL"

curl -s --location $URL | tar xz -C bin/
#!/usr/bin/env bash

set -eo pipefail

readonly LATEST='https://api.github.com/repos/exercism/configlet/releases/latest'

case "$(uname)" in
Darwin*) os='mac' ;;
Linux*) os='linux' ;;
Windows*) os='windows' ;;
MINGW*) os='windows' ;;
MSYS_NT-*) os='windows' ;;
*) os='linux' ;;
esac

case "${os}" in
windows*) ext='zip' ;;
*) ext='tgz' ;;
esac

case "$(uname -m)" in
*64*) arch='64bit' ;;
*686*) arch='32bit' ;;
*386*) arch='32bit' ;;
*) arch='64bit' ;;
esac

curlopts=(
--silent
--show-error
--fail
--location
--retry 3
)

if [[ -n "${GITHUB_TOKEN}" ]]; then
curlopts+=(--header "authorization: Bearer ${GITHUB_TOKEN}")
fi

suffix="${os}-${arch}.${ext}"

get_download_url() {
curl "${curlopts[@]}" --header 'Accept: application/vnd.github.v3+json' "${LATEST}" |
grep "\"browser_download_url\": \".*/download/.*/configlet.*${suffix}\"$" |
cut -d'"' -f4
}

download_url="$(get_download_url)"
output_dir="bin"
output_path="${output_dir}/latest-configlet.${ext}"
curl "${curlopts[@]}" --output "${output_path}" "${download_url}"

case "${ext}" in
*zip) unzip "${output_path}" -d "${output_dir}" ;;
*) tar xzf "${output_path}" -C "${output_dir}" ;;
esac

rm -f "${output_path}"
Loading