Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Commit

Permalink
Enable appveyor deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
thorio committed Feb 3, 2020
1 parent b37285a commit d377efd
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
26 changes: 20 additions & 6 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Test against the latest version of this Node.js version
skip_tags: true

environment:
nodejs_version: "10"

# Install scripts. (runs after repo cloning)
install:
# Get the latest stable version of Node.js or io.js
- ps: Install-Product node $env:nodejs_version
- npm install
- ps: $env:package_version = (Get-Content -Raw -Path package.json | ConvertFrom-Json).version
- ps: Update-AppveyorBuild -Version "$env:package_version-b$env:APPVEYOR_BUILD_NUMBER"
- npm --no-git-tag-version version %APPVEYOR_BUILD_VERSION%

build_script:
- npm run build
Expand All @@ -18,7 +20,19 @@ test_script:

test: on

artifacts:
- path: build/bundle.js
name: script.user.js
artifacts:
- path: build/bundle.user.js
name: bundle.user.js

deploy:
- provider: GitHub
tag: $(appveyor_build_version)
release: Version $(appveyor_build_version)
description: 'Changelog:'
auth_token:
secure: xMcnocRvXpoVccUdQMgu52bjunzTLDzCnxaeum8+74zTMxmRW7+iHD653YEd70VR
repository: thorio/kgrabber
artifact: bundle.user.js
draft: true
on:
branch: master
3 changes: 2 additions & 1 deletion gulp/userscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const gulp = require("gulp"),

const src_dir = "./src",
build_dir = "./build",
file_name = "bundle.user.js",
header_path = `${src_dir}/header.txt`,
version_number = require("../package.json").version; // get version from package.json

Expand Down Expand Up @@ -81,7 +82,7 @@ async function bundle() {
})
.bundle() // run browserify
.on("error", swallowIfWatching) // suppress errors if using the watcher
.pipe(source("bundle.js"))
.pipe(source(file_name))
.pipe(header(await shared.readFile(header_path), { version: version_number })) // add the userscript header
.pipe(gulp.dest(build_dir));
}
Expand Down

0 comments on commit d377efd

Please sign in to comment.