Skip to content

Commit

Permalink
TravisCI/DETAILED_CHANGELOG/Scripts: Fix all old issues
Browse files Browse the repository at this point in the history
lng_pack: Add falling back to old method

Signed-off-by: Caio Oliveira <caiooliveirafarias0@gmail.com>

lng_pack/.gitignore: Fix chmod and ignore all .ZIP

Signed-off-by: Caio Oliveira <caiooliveirafarias0@gmail.com>

make_changelog: Fix issues when calling via sh

Signed-off-by: Caio Oliveira <caiooliveirafarias0@gmail.com>

TravisCI/DETAILED_CHANGELOG: Fix issue with latest changes

TravisCI: Optimize @Dr-Q changes

Signed-off-by: Caio Oliveira <caiooliveirafarias0@gmail.com>

TravisCI: Remove not working uploading of log

Signed-off-by: Caio Oliveira <caiooliveirafarias0@gmail.com>

TravisCI: Update to latest changes in Makefile

Signed-off-by: Caio Oliveira <caiooliveirafarias0@gmail.com>

TravisCI: Convert '/' to '-'

Signed-off-by: Caio Oliveira <caiooliveirafarias0@gmail.com>

TravisCI: Use only the name

Signed-off-by: Caio Oliveira <caiooliveirafarias0@gmail.com>

TravisCI: Add tag to TravisCI build, and remove Deploy section

* Why I removed Deploy Section?
  This is simple, Official builds have custom changes and we are using transfer.sh to upload TravisCI builds
  But Official builds, need more than custom changes I think. Also @ElPatas, make upload of Beta Releases in a new tag,
  see 3937113
* Fix export of variables in TravisCI

Signed-off-by: Caio Oliveira <caiooliveirafarias0@gmail.com>

TravisCI: We need to debug PS2Toolchain issues

Signed-off-by: Caio Oliveira <caiooliveirafarias0@gmail.com>

TravisCI: Fix problems with upload zip's

Signed-off-by: Caio Oliveira <caiooliveirafarias0@gmail.com>

.gitignore: Optimize it

Signed-off-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
  • Loading branch information
Caio99BR authored and doctorxyz committed Jan 23, 2017
1 parent 8a5b57f commit e939566
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 39 deletions.
27 changes: 22 additions & 5 deletions .gitignore
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,15 +1,32 @@
*.o
*.s
#
# NOTE! Please use 'git ls-files -i --exclude-standard'
# command after changing this file, to see if there are
# any tracked files which get ignored after the change.
#
# Normal rules
#
*.a
*.diff
*.elf
*.ELF
*.erl
*.irx
*.exe
*.irx
*.map
*.o
*.patch
*.diff
*.rej
*.s
*.zip
libfreetype.a
*.ZIP

#
# git files that we don't want to ignore even it they are dot-files
#
!.gitignore

#
# Generated source files
#
pc/iso2usbld/bin/iso2usbld
IOPRP_img.c
45 changes: 16 additions & 29 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@ git:

before_install:
## Save env dir
- cd ..
- cd ../
- export TRAVIS_ENV_DIR=$(pwd)

## Save repo name
- export NEW_REPO_SLUG=$(echo ${TRAVIS_REPO_SLUG} | cut -f 1 -d "/")

install:
## Dependencies
- sudo apt-get install -yqqq gcc-4.4 patch wget make git libc6-dev zlib1g zlib1g-dev libucl1 libucl-dev
Expand Down Expand Up @@ -47,7 +50,9 @@ before_script:

## ps2dev/PS2Toolchain
- cd ${TRAVIS_ENV_DIR}/ps2toolchain/
- bash ./toolchain.sh &> /dev/null
- bash ./toolchain.sh > /tmp/OPNPS2LD-PS2TOOLCHAIN.log 2>&1
- curl --upload-file /tmp/OPNPS2LD-PS2TOOLCHAIN.log https://transfer.sh/OPNPS2LD-PS2TOOLCHAIN-${NEW_REPO_SLUG}-NIGHTLY${TRAVIS_BUILD_NUMBER}.log

## ps2dev/PS2SDKPorts/zlib
- cd ${TRAVIS_ENV_DIR}/ps2sdk-ports/zlib/
- make
Expand Down Expand Up @@ -87,41 +92,23 @@ script:
## Go back to opl dir
- cd ${TRAVIS_BUILD_DIR}/

## Make a new changelog and pack of langs
## BUG: If we not call './make_changelog.sh' before 'make', it will always
## build OPL with old REVISION, and make things confuse
##
## Make a new changelog
- bash ./make_changelog.sh
- bash ./lng_pack.sh

## Hack to prevent '-dirty' flag
- git add -A

## Let's build Open PS2 Loader Release!
- make release
- make release LOCALVERSION=${NEW_REPO_SLUG}

## Make the lang pack
- bash ./lng_pack.sh

after_success:
- export OPL_VERSION=$(make oplversion)
- curl --upload-file ${TRAVIS_BUILD_DIR}/OPNPS2LD-${OPL_VERSION}.zip https://transfer.sh/OPNPS2LD-${OPL_VERSION}-NIGHTLY${TRAVIS_BUILD_NUMBER}.zip
- curl --upload-file ${TRAVIS_BUILD_DIR}/OPNPS2LD-${OPL_VERSION}-${NEW_REPO_SLUG}.ZIP https://transfer.sh/OPNPS2LD-${OPL_VERSION}-${NEW_REPO_SLUG}-NIGHTLY${TRAVIS_BUILD_NUMBER}.zip
- curl --upload-file ${TRAVIS_BUILD_DIR}/OPNPS2LD_LANGS-${OPL_VERSION}.zip https://transfer.sh/OPNPS2LD_LANGS-${OPL_VERSION}-NIGHTLY${TRAVIS_BUILD_NUMBER}.zip

## [TEMPLATE] Deploy OPL to Github Releases
# 1. Clone this repository
# 2. Copy '.travis.yml' to '.travis-original.yml' (you will need it after)
# 3. Install Travis Client <https://github.com/travis-ci/travis.rb#installation>
# 4. Run command: $(travis setup releases)
# After follow all previous steps, pickup ONLY the "secure" line
# and change it on '.travis-original.yml'
# 5. Move '.travis-original.yml' to '.travis.yml'
# 6. Commit it
## NOTE: You need to configure TravisCI before anything <https://travis-ci.org/>

## Deploy OPL to Github Releases
deploy:
provider: releases
skip_cleanup: true
#api_key:
# secure: [PUT YOUR NEW SECURE API KEY HERE]
file_glob: true
file:
- "${TRAVIS_BUILD_DIR}/OPNPS2LD-*.zip"
- "${TRAVIS_BUILD_DIR}/OPNPS2LD_LANGS-*.zip"
on:
tags: true
11 changes: 10 additions & 1 deletion DETAILED_CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,16 @@ Automatically Generated by make_changelog.sh. DO NOT EDIT

Open PS2 Loader Detailed ChangeLog:

rev978 - doctorxyz - SP193: SMB fix, when no share name is specified (Network config-> SMB Share > Share -> Leave empty to list shares)
rev987 - Doctor Q - lng_pack.sh: Make it more simple and less hack-ish - Sat Jan 21 23:52:55 2017 -0200
rev986 - Liu Woon Yung - Updated to compile error and warning-free with the head PS2SDK. HDD and PFS drivers were also updated. (#35) - Sat Jan 21 14:44:03 2017 -0200
rev985 - ShaolinAssassin - Update dialogs.c (#33) - Tue Jan 17 20:20:44 2017 +0100
rev984 - ShaolinAssassin - Update dialogs.c (#31) - Mon Jan 16 08:14:44 2017 -0200
rev983 - Rick Gaiser - Settings for display X and Y offset (#29) - Sun Jan 15 14:06:23 2017 -0200
rev982 - uyjulian - General cleanup (#27) - Sun Jan 15 08:57:54 2017 -0200
rev981 - Liu Woon Yung - Updated to support LWIP v2.0.0. (#30) - Sat Dec 24 13:30:47 2016 +0100
rev980 - AKuHAK - Optimized makefiles. (#24) - Wed Nov 23 23:03:15 2016 -0200
rev979 - ElPatas1 - Update languages. Fixed left-right icons which do not shows due to the optimize .png size made in commit 879ec74. - Tue Nov 8 17:13:23 2016 +0100
rev978 - doctorxyz - SP193: SMB fix, when no share name is specified (Network config-> SMB Share > Share -> Leave empty to list shares) http://psx-scene.com/forums/f150/open-ps2-loader-project-v0-9-3-a-62141/index154.html#post1209991 - Mon Oct 31 14:24:44 2016 -0200
rev977 - uyjulian - fix spacing, links, and wording in readme - Sun Oct 30 00:30:19 2016 -0200
rev976 - doctorxyz - uyjulian: Revert optimize .png for size (879ec74), since it may cause issues (apparently loading icon won't show: http://psx-scene.com/forums/f150/open-ps2-loader-project-v0-9-3-a-62141/index767.html#post1209937) - Sun Oct 30 00:19:00 2016 -0200
rev975 - doctorxyz - GSM Core gardening - Sat Oct 29 21:25:37 2016 -0200
Expand Down
21 changes: 19 additions & 2 deletions lng_pack.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
#!/bin/bash
# Lang Packer for Open-PS2-Loader by Caio99BR <caiooliveirafarias0@gmail.com>
# Lang Packer for Open-PS2-Loader
# Made by Caio99BR <caiooliveirafarias0@gmail.com>
# Reworked by Doctor Q <Dr-Q@users.noreply.github.com>

# Set variables
CURRENT_DIR=$(pwd)
BUILD_DIR="/tmp/OPL_LANG"
LANG_LIST="/tmp/OPL_LANG_LIST"
OPL_VERSION=$(make oplversion)
make oplversion 2>/dev/null
if [ $? == "0" ]
then
export OPL_VERSION=$(make oplversion)
else
echo "Falling back to old OPL Lang Pack"
VERSION=$(cat ${CURRENT_DIR}/Makefile | grep "VERSION =" | head -1 | cut -d " " -f 3)
SUBVERSION=$(cat ${CURRENT_DIR}/Makefile | grep "SUBVERSION =" | head -1 | cut -d " " -f 3)
PATCHLEVEL=$(cat ${CURRENT_DIR}/Makefile | grep "PATCHLEVEL =" | head -1 | cut -d " " -f 3)
REVISION=$(($(cat ${CURRENT_DIR}/DETAILED_CHANGELOG | grep "rev" | head -1 | cut -d " " -f 1 | cut -c 4-) + 1))
EXTRAVERSION=$(cat ${CURRENT_DIR}/Makefile | grep "EXTRAVERSION =" | head -1 | cut -d " " -f 3)
if [ ${EXTRAVERSION} != "" ]; then EXTRAVERSION=-${EXTRAVERSION}; fi
GIT_HASH=$(git -C ${CURRENT_DIR}/ rev-parse --short=7 HEAD 2>/dev/null)
if [ ${GIT_HASH} != "" ]; then GIT_HASH=-${GIT_HASH}; fi
export OPL_VERSION=${VERSION}.${SUBVERSION}.${PATCHLEVEL}.${REVISION}${EXTRAVERSION}${GIT_HASH}
fi

# Print a list
printf "$(ls ${CURRENT_DIR}/lng/ | cut -c 6- | rev | cut -c 5- | rev)" > ${LANG_LIST}
Expand Down
4 changes: 2 additions & 2 deletions make_changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fi
# Store author, commit and date on temp file
git log --pretty=format:"%an - %s - %cd" > /tmp/commit_summary
if ! [ "${?}" == "0" ]
if [ "${?}" != "0" ]
then
echo "Git command failed, exiting..."
break
Expand All @@ -47,7 +47,7 @@ echo "Current Revision ${number_commits} (Of BitBucket r${old_number_commits} +
# Store author, commit and date on temp file
git log -${new_number_commits} --pretty=format:"%an - %s - %cd" > /tmp/commit_summary
if ! [ "${?}" == "0" ]
if [ "${?}" != "0" ]
then
echo "Git command failed, exiting..."
break
Expand Down

0 comments on commit e939566

Please sign in to comment.