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

Make PkgTemplates work on 1.0 #19

Merged
merged 23 commits into from
Sep 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f070978
Void -> Nothing
christopher-dG Sep 17, 2018
632283b
Replace Void/Nullables
christopher-dG Sep 17, 2018
d7b4859
Add Project/Manifest.toml
christopher-dG Sep 17, 2018
a87e6a0
Update license years
christopher-dG Sep 17, 2018
adbbfd8
More deprecations: info, Pkg, nullables, and more, and update default…
christopher-dG Sep 17, 2018
d932a29
Deprecations: readstring, Nullables, warn
christopher-dG Sep 17, 2018
564a379
@info instead of @warn
christopher-dG Sep 17, 2018
1385d6f
A few more deprecations
christopher-dG Sep 17, 2018
e29a6b9
Deprecation fixes, mostly in tests (local tests are passing!)
christopher-dG Sep 19, 2018
3a2f3fc
More deprecations, mostly readstring
christopher-dG Sep 19, 2018
bbd492a
sed -i '' -E 's/contains\((.+), (.+)\)/occursin\(\2, \1\)/'
christopher-dG Sep 19, 2018
9fc6092
Fix one broken test from last commit
christopher-dG Sep 19, 2018
ab26117
A few more deprecations still
christopher-dG Sep 19, 2018
c74ee42
Update templates, since a Mustache bug is fixed
christopher-dG Sep 19, 2018
4e4c68d
Replace travis-ci.org with travis-ci.com (close #18)
christopher-dG Sep 19, 2018
0ae017f
Use REPL.TerminalMenus
christopher-dG Sep 19, 2018
ce318d1
Don't explicitly import Base.show
christopher-dG Sep 19, 2018
071bc7e
Drop 0.6
christopher-dG Sep 19, 2018
11e2201
Fix logging statement
christopher-dG Sep 19, 2018
07d10c7
Configure Git in CI
christopher-dG Sep 24, 2018
ec51857
Add a bunch of comments to the tests
christopher-dG Sep 24, 2018
6fd5785
Lower minimum version to 0.7, test on 0.7
christopher-dG Sep 24, 2018
50ed265
Add explanation of Git configuration step
christopher-dG Sep 24, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 18 additions & 26 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,30 @@
environment:
matrix:
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.6/julia-0.6-latest-win32.exe"
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.6/julia-0.6-latest-win64.exe"
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe"
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe"


- julia_version: 0.7
- julia_version: 1.0
- julia_version: nightly
platform:
- x86
- x64
matrix:
allow_failures:
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe"
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe"

- julia_version: nightly
notifications:
- provider: Email
on_build_success: false
on_build_failure: false
on_build_status_changed: false

install:
- ps: "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12"
# Download most recent Julia Windows binary
- ps: (new-object net.webclient).DownloadFile(
$env:JULIA_URL,
"C:\projects\julia-binary.exe")
# Run installer silently, output to C:\projects\julia
- C:\projects\julia-binary.exe /S /D=C:\projects\julia

- ps: iex ((new-object net.webclient).DownloadString("https://raw.githubusercontent.com/JuliaCI/Appveyor.jl/version-1/bin/install.ps1"))
build_script:
# Need to convert from shallow to complete for Pkg.clone to work
- IF EXIST .git\shallow (git fetch --unshallow)
- C:\projects\julia\bin\julia -e "versioninfo(); Pkg.clone(pwd(), \"PkgTemplates\")"

- echo "%JL_BUILD_SCRIPT%"
- C:\julia\bin\julia -e "%JL_BUILD_SCRIPT%"
test_script:
- C:\projects\julia\bin\julia -e "Pkg.test(\"PkgTemplates\"; coverage=true)"

after_test:
- C:\projects\julia\bin\julia -e "VERSION > v\"0.6.2\" && exit(); cd(Pkg.dir(\"PkgTemplates\")); Pkg.add(\"Coverage\"); using Coverage; Codecov.submit(process_folder())"
# Git configuration is required to make commits in generated packages.
- git config --global user.name "AppVeyor"
- git config --global user.email "[email protected]"
- echo "%JL_TEST_SCRIPT%"
- C:\julia\bin\julia -e "%JL_TEST_SCRIPT%"
on_success:
- echo "%JL_CODECOV_SCRIPT%"
- C:\julia\bin\julia -e "%JL_CODECOV_SCRIPT%"
15 changes: 9 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,20 @@ os:
- linux
- osx
julia:
- 0.6
christopher-dG marked this conversation as resolved.
Show resolved Hide resolved
- 0.7
- 1.0
- nightly
matrix:
allow_failures:
- julia: nightly
fast_finish: true
notifications:
email: false
script:
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
- julia -e 'Pkg.clone(pwd()); Pkg.test("PkgTemplates"; coverage=true)'
before_script:
# Git configuration is required to make commits in generated packages.
- git config --global user.name "Travis"
- git config --global user.email "[email protected]"
after_success:
- julia -e 'VERSION > v"0.6.2" && exit(); cd(Pkg.dir("PkgTemplates")); Pkg.add("Coverage"); using Coverage; Codecov.submit(process_folder())'
- julia -e 'Pkg.add("Documenter"); cd(Pkg.dir("PkgTemplates")); include(joinpath("docs", "make.jl"))'
- julia -e 'using Pkg; Pkg.add("Coverage")'
- julia -e 'using Coverage; CodeCov.submit(process_folder())'
- julia -e 'using Pkg; Pkg.add("Documenter"); include(joinpath("docs", "make.jl"))'
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2017 Chris de Graaf, Invenia Technical Computing Corporation
Copyright (c) 2017-2018 Chris de Graaf, Invenia Technical Computing Corporation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
84 changes: 84 additions & 0 deletions Manifest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
[[AutoHashEquals]]
git-tree-sha1 = "45bb6705d93be619b81451bb2006b7ee5d4e4453"
uuid = "15f4f7f2-30c1-5605-9d31-71845cf9641f"
version = "0.2.0"

[[Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

[[Dates]]
deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"

[[Distributed]]
deps = ["LinearAlgebra", "Random", "Serialization", "Sockets"]
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"

[[InteractiveUtils]]
deps = ["LinearAlgebra", "Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"

[[LibGit2]]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"

[[Libdl]]
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"

[[LinearAlgebra]]
deps = ["Libdl"]
uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

[[Logging]]
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"

[[Markdown]]
deps = ["Base64"]
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"

[[Mustache]]
deps = ["Pkg", "Test"]
git-tree-sha1 = "fb4b57a278d18434eff78bdc2c06238f6ee3c9e7"
uuid = "ffc61752-8dc7-55ee-8c37-f3e9cdd09e70"
version = "0.5.1"

[[Pkg]]
deps = ["Dates", "LibGit2", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"

[[Printf]]
deps = ["Unicode"]
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"

[[REPL]]
deps = ["InteractiveUtils", "Markdown", "Sockets"]
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"

[[Random]]
deps = ["Serialization"]
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[[SHA]]
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"

[[Serialization]]
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"

[[Sockets]]
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"

[[Test]]
deps = ["Distributed", "InteractiveUtils", "Logging", "Random"]
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[[URIParser]]
deps = ["Test", "Unicode"]
git-tree-sha1 = "6ddf8244220dfda2f17539fa8c9de20d6c575b69"
uuid = "30578b45-9adc-5946-b283-645ec420af67"
version = "0.4.0"

[[UUIDs]]
deps = ["Random"]
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

[[Unicode]]
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
15 changes: 15 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name = "PkgTemplates"
uuid = "19f0ff7e-bab4-11e8-074b-97459630f98a"
authors = ["Chris de Graaf <[email protected]>"]
version = "0.1.0"

[deps]
AutoHashEquals = "15f4f7f2-30c1-5605-9d31-71845cf9641f"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433"
Mustache = "ffc61752-8dc7-55ee-8c37-f3e9cdd09e70"
REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
URIParser = "30578b45-9adc-5946-b283-645ec420af67"
3 changes: 1 addition & 2 deletions REQUIRE
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
julia 0.6
julia 0.7
AutoHashEquals
Mustache
TerminalMenus
URIParser
14 changes: 10 additions & 4 deletions defaults/appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,14 @@ build_script:
- C:\projects\julia\bin\julia -e "versioninfo(); Pkg.clone(pwd(), \"{{PKGNAME}}\"); Pkg.build(\"{{PKGNAME}}\")"

test_script:
- C:\projects\julia\bin\julia -e "Pkg.test(\"{{PKGNAME}}\"{{#AFTER}}; coverage=true{{/AFTER}})"{{#AFTER}}
- C:\projects\julia\bin\julia -e "Pkg.test(\"{{PKGNAME}}\"{{#AFTER}}; coverage=true{{/AFTER}})"
{{#AFTER}}

after_test:{{#CODECOV}}
- C:\projects\julia\bin\julia -e "cd(Pkg.dir(\"{{PKGNAME}}\")); Pkg.add(\"Coverage\"); using Coverage; Codecov.submit(process_folder())"{{/CODECOV}}{{#COVERALLS}}
- C:\projects\julia\bin\julia -e "cd(Pkg.dir(\"{{PKGNAME}}\")); Pkg.add(\"Coverage\"); using Coverage; Coveralls.submit(process_folder())"{{/COVERALLS}}{{/AFTER}}
after_test:
{{#CODECOV}}
- C:\projects\julia\bin\julia -e "cd(Pkg.dir(\"{{PKGNAME}}\")); Pkg.add(\"Coverage\"); using Coverage; Codecov.submit(process_folder())"
{{/CODECOV}}
{{#COVERALLS}}
- C:\projects\julia\bin\julia -e "cd(Pkg.dir(\"{{PKGNAME}}\")); Pkg.add(\"Coverage\"); using Coverage; Coveralls.submit(process_folder())"
{{/COVERALLS}}
{{/AFTER}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default appveyor.yml script should be now based upon the Appveyor.jl package.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I'm going to change this in the next PR which will update the real functionality.

24 changes: 16 additions & 8 deletions defaults/gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
{{#GITLABCOVERAGE}}stages:
{{#GITLABCOVERAGE}}
stages:
- test
- coverage

{{/GITLABCOVERAGE}}.test_template: &test_template
stage: test{{#GITLABCOVERAGE}}
{{/GITLABCOVERAGE}}
.test_template: &test_template
stage: test
{{#GITLABCOVERAGE}}
artifacts:
name: coverage
expire_in: 2 hours
paths:
- coverage/{{/GITLABCOVERAGE}}
- coverage/
{{/GITLABCOVERAGE}}
tags:
- docker
script:
- julia -e 'Pkg.clone(pwd()); Pkg.build("{{PKGNAME}}"); Pkg.test("{{PKGNAME}}"{{#GITLABCOVERAGE}}; coverage=true{{/GITLABCOVERAGE}})'{{#GITLABCOVERAGE}}
- cp -r $(julia -e 'print(Pkg.dir("{{PKGNAME}}", "src"))') coverage{{/GITLABCOVERAGE}}
- julia -e 'Pkg.clone(pwd()); Pkg.build("{{PKGNAME}}"); Pkg.test("{{PKGNAME}}"{{#GITLABCOVERAGE}}; coverage=true{{/GITLABCOVERAGE}})'
{{#GITLABCOVERAGE}}
- cp -r $(julia -e 'print(Pkg.dir("{{PKGNAME}}", "src"))') coverage
{{/GITLABCOVERAGE}}

Julia {{VERSION}}:
image: julia:{{VERSION}}
Expand All @@ -22,7 +28,8 @@ Julia {{VERSION}}:
Julia nightly:
image: staticfloat/julia:nightly-x64
allow_failure: true
<<: *test_template{{#GITLABCOVERAGE}}
<<: *test_template
{{#GITLABCOVERAGE}}

"Coverage":
stage: coverage
Expand All @@ -34,4 +41,5 @@ Julia nightly:
- apt-get update && apt-get -y install git make unzip gcc bzip2
script:
- rm -rf src && mv coverage src
- julia -e 'Pkg.add("Coverage"); using Coverage; c, t = get_summary(process_folder()); @printf("Test Coverage %.2f%%\n", 100c/t)'{{/GITLABCOVERAGE}}
- julia -e 'Pkg.add("Coverage"); using Coverage; c, t = get_summary(process_folder()); @printf("Test Coverage %.2f%%\n", 100c/t)'
{{/GITLABCOVERAGE}}
18 changes: 13 additions & 5 deletions defaults/travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,16 @@ notifications:
email: false
script:
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
- julia -e 'Pkg.clone(pwd()); Pkg.build("{{PKGNAME}}"); Pkg.test("{{PKGNAME}}"{{#AFTER}}; coverage=true{{/AFTER}})'{{#AFTER}}
after_success:{{#CODECOV}}
- julia -e 'cd(Pkg.dir("{{PKGNAME}}")); Pkg.add("Coverage"); using Coverage; Codecov.submit(process_folder())'{{/CODECOV}}{{#COVERALLS}}
- julia -e 'cd(Pkg.dir("{{PKGNAME}}")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(process_folder())'{{/COVERALLS}}{{#DOCUMENTER}}
- julia -e 'Pkg.add("Documenter"); cd(Pkg.dir("{{PKGNAME}}")); include(joinpath("docs", "make.jl"))'{{/DOCUMENTER}}{{/AFTER}}
- julia -e 'Pkg.clone(pwd()); Pkg.build("{{PKGNAME}}"); Pkg.test("{{PKGNAME}}"{{#AFTER}}; coverage=true{{/AFTER}})'
{{#AFTER}}
after_success:
{{#CODECOV}}
- julia -e 'cd(Pkg.dir("{{PKGNAME}}")); Pkg.add("Coverage"); using Coverage; Codecov.submit(process_folder())'
{{/CODECOV}}
{{#COVERALLS}}
- julia -e 'cd(Pkg.dir("{{PKGNAME}}")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(process_folder())'
{{/COVERALLS}}
{{#DOCUMENTER}}
- julia -e 'Pkg.add("Documenter"); cd(Pkg.dir("{{PKGNAME}}")); include(joinpath("docs", "make.jl"))'
{{/DOCUMENTER}}
{{/AFTER}}
2 changes: 1 addition & 1 deletion docs/src/pages/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ CurrentModule = PkgTemplates

# Plugins

Plugins are the secret sauce behing `PkgTemplates`'s customization and extension. This page
Plugins are the secret sauce behind `PkgTemplates`'s customization and extension. This page
describes plugins that already exist; for information on writing your own plugins, see
[Plugin Development](@ref).

Expand Down
6 changes: 5 additions & 1 deletion src/PkgTemplates.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ __precompile__()
module PkgTemplates

using AutoHashEquals
using Dates
using Distributed
using InteractiveUtils
using LibGit2
using Mustache
using TerminalMenus
using REPL.TerminalMenus
using URIParser

export
Expand Down
Loading