@@ -3,29 +3,48 @@ jdk: oraclejdk8
3
3
branches :
4
4
except :
5
5
- " /^*-v[0-9]/"
6
+ - " /^*-mc/"
6
7
- " maven-repo"
7
8
env :
8
9
global :
9
10
- MC_VERSION=1.11.2
10
11
- PLUGIN_VERSION=2.0
11
12
install : true
12
13
before_script :
14
+ -
git config --global user.email "[email protected] "
15
+ - git config --global user.name "Travis CI"
13
16
- ' sed -i "s/^\(version: \).*\$/\1$PLUGIN_VERSION.$TRAVIS_BUILD_NUMBER-mc$MC_VERSION/g" src/main/resources/plugin.yml'
14
17
script : gradle build
15
18
before_cache :
16
19
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
20
+ - rm -f $HOME/.gradle/caches/3.5/fileHashes/fileHashes.bin
21
+ - rm -f $HOME/.gradle/caches/3.5/fileHashes/fileHashes.lock
22
+ - rm -f $HOME/.gradle/caches/transforms-1/transforms-1.lock
17
23
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
18
24
cache :
19
25
directories :
20
26
- $HOME/.gradle/caches/
21
27
- $HOME/.gradle/wrapper/
22
28
before_deploy :
23
29
- cp build/libs/NyaaCore.jar ./NyaaCore-$PLUGIN_VERSION.$TRAVIS_BUILD_NUMBER-mc$MC_VERSION.jar
24
- -
git config --global user.email "[email protected] "
25
- - git config --global user.name "Travis CI"
26
30
- export GIT_TAG=$PLUGIN_VERSION.$TRAVIS_BUILD_NUMBER-mc$MC_VERSION
31
+ - export GIT_ORIGIN_URL=`git config --get remote.origin.url`
27
32
- git tag $GIT_TAG -a -m "Generated tag from TravisCI for build $TRAVIS_BUILD_NUMBER"
28
- -
git push -q https://RecursiveG:[email protected] /NyaaCat/NyaaCore --follow-tags
33
+ - git config credential.helper "store --file=.git/credentials"
34
+ - echo "https://$GITHUB_OAUTH_TOKEN:@github.com" > .git/credentials
35
+ - git push -q --follow-tags
36
+ - gem install octokit -v 4.3.0
37
+ - gradle publish
38
+ - cd ..
39
+ - git clone -b maven-repo $GIT_ORIGIN_URL nyaacore-mvn
40
+ - cp -r NyaaCore/build/repo/cat nyaacore-mvn/
41
+ - cd nyaacore-mvn
42
+ - git config credential.helper "store --file=.git/credentials"
43
+ - echo "https://$GITHUB_OAUTH_TOKEN:@github.com" > .git/credentials
44
+ - git add .
45
+ - git commit -m "auto generated maven repo"
46
+ - git push --follow-tags
47
+ - cd ../NyaaCore
29
48
deploy :
30
49
skip_cleanup : true
31
50
provider : releases
0 commit comments